public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Daniel Mack <zonque@gmail.com>
Cc: Valentin Ilie <valentin.ilie@gmail.com>,
	davem@davemloft.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: can: af_can.c: Fix checkpatch warnings
Date: Sun, 10 Mar 2013 14:11:48 +0100	[thread overview]
Message-ID: <513C8694.9090003@hartkopp.net> (raw)
In-Reply-To: <CACTFLAM4DtRGvEFQo5yXhR4Sjx8hKBJoNqARqA5U+9iQK=gkBg@mail.gmail.com>

On 10.03.2013 14:05, Daniel Mack wrote:


>>> @@ -817,8 +817,7 @@ static int can_notifier(struct notifier_block *nb, unsigned long msg,
>>>               /* create new dev_rcv_lists for this device */
>>>               d = kzalloc(sizeof(*d), GFP_KERNEL);
>>>               if (!d) {
>>> -                     printk(KERN_ERR
>>> -                            "can: allocation of receive list failed\n");
>>> +                     pr_err("can: allocation of receive list failed\n");
>>>                       return NOTIFY_DONE;
>>>               }
>>
>>
>> As i've seen in former patches from Joe Perches OOM messages are obsolete.
>>
>> You could write
>>
>> if(!d)
>>         return NOTIFY_DONE;
>>
>> here instead.
> 
> While at it, why not switch to dev_err() instead?


Hm, no.

1. pr_err() would be fine, as dev_err() is for drivers - and we're in
linux/net here and not in linux/drivers

2. When removing the entire printk() statement there's nothing to be modified left

Regards,
Oliver


  reply	other threads:[~2013-03-10 13:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-10 12:28 [PATCH] net: can: af_can.c: Fix checkpatch warnings Valentin Ilie
2013-03-10 12:45 ` Oliver Hartkopp
2013-03-10 13:05   ` Daniel Mack
2013-03-10 13:11     ` Oliver Hartkopp [this message]
2013-03-10 21:15 ` [PATCHv2] " Valentin Ilie
2013-03-11  7:02   ` Oliver Hartkopp
2013-03-11 11:40     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=513C8694.9090003@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=valentin.ilie@gmail.com \
    --cc=zonque@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox