lkml.org 
[lkml]   [2017]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] tty: n_gsm: pr_err() strings should end with newlines
From
Date
Hi,


On Monday 09 October 2017 05:30 PM, Joe Perches wrote:
> On Mon, 2017-10-09 at 17:14 +0530, Arvind Yadav wrote:
>> pr_err() messages should end with a new-line to avoid other messages
>> being concatenated.
> []
>> diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
> []
>> @@ -2788,7 +2788,7 @@ static int gsm_create_network(struct gsm_dlci *dlci, struct gsm_netconfig *nc)
>> net = alloc_netdev(sizeof(struct gsm_mux_net), netname,
>> NET_NAME_UNKNOWN, gsm_mux_net_init);
>> if (!net) {
>> - pr_err("alloc_netdev failed");
>> + pr_err("alloc_netdev failed\n");
>> return -ENOMEM;
>> }
>> net->mtu = dlci->gsm->mtu;
> You could just delete the pr_err instead.
>
> It's an unnecessary message as there would
> be a dump_stack() on the kvzalloc() in
> alloc_netdev() on any OOM failure.
You are right, We can delete. I will send updated patch.
>
>
~arvind

\
 
 \ /
  Last update: 2017-10-09 14:04    [W:0.140 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site