* [PATCH] tty: n_gsm: pr_err() strings should end with newlines
@ 2017-10-09 11:44 Arvind Yadav
2017-10-09 12:00 ` Joe Perches
0 siblings, 1 reply; 3+ messages in thread
From: Arvind Yadav @ 2017-10-09 11:44 UTC (permalink / raw)
To: gregkh, jslaby; +Cc: linux-kernel
pr_err() messages should end with a new-line to avoid other messages
being concatenated.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/tty/n_gsm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 0a3c966..b27986f 100644
--- 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;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tty: n_gsm: pr_err() strings should end with newlines
2017-10-09 11:44 [PATCH] tty: n_gsm: pr_err() strings should end with newlines Arvind Yadav
@ 2017-10-09 12:00 ` Joe Perches
2017-10-09 12:02 ` Arvind Yadav
0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2017-10-09 12:00 UTC (permalink / raw)
To: Arvind Yadav, gregkh, jslaby; +Cc: linux-kernel
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tty: n_gsm: pr_err() strings should end with newlines
2017-10-09 12:00 ` Joe Perches
@ 2017-10-09 12:02 ` Arvind Yadav
0 siblings, 0 replies; 3+ messages in thread
From: Arvind Yadav @ 2017-10-09 12:02 UTC (permalink / raw)
To: Joe Perches, gregkh, jslaby; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-09 12:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-09 11:44 [PATCH] tty: n_gsm: pr_err() strings should end with newlines Arvind Yadav
2017-10-09 12:00 ` Joe Perches
2017-10-09 12:02 ` Arvind Yadav
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox