lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 10 Mar 2013 14:11:48 +0100
From:	Oliver Hartkopp <socketcan@...tkopp.net>
To:	Daniel Mack <zonque@...il.com>
CC:	Valentin Ilie <valentin.ilie@...il.com>, davem@...emloft.net,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: can: af_can.c: Fix checkpatch warnings

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ