From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Valentin Ilie <valentin.ilie@gmail.com>
Cc: davem@davemloft.net, linux-can@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2] net: can: af_can.c: Fix checkpatch warnings
Date: Mon, 11 Mar 2013 08:02:43 +0100 [thread overview]
Message-ID: <513D8193.3080405@hartkopp.net> (raw)
In-Reply-To: <1362950113-25515-1-git-send-email-valentin.ilie@gmail.com>
On 10.03.2013 22:15, Valentin Ilie wrote:
> Replace printk(KERN_ERR with pr_err
> Add space before {
> Removed OOM messages
>
> Signed-off-by: Valentin Ilie <valentin.ilie@gmail.com>
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Thanks Valentin
> ---
> net/can/af_can.c | 21 ++++++++-------------
> 1 file changed, 8 insertions(+), 13 deletions(-)
>
> diff --git a/net/can/af_can.c b/net/can/af_can.c
> index c48e522..8bacf28 100644
> --- a/net/can/af_can.c
> +++ b/net/can/af_can.c
> @@ -525,7 +525,7 @@ void can_rx_unregister(struct net_device *dev, canid_t can_id, canid_t mask,
>
> d = find_dev_rcv_lists(dev);
> if (!d) {
> - printk(KERN_ERR "BUG: receive list not found for "
> + pr_err("BUG: receive list not found for "
> "dev %s, id %03X, mask %03X\n",
> DNAME(dev), can_id, mask);
> goto out;
> @@ -552,7 +552,7 @@ void can_rx_unregister(struct net_device *dev, canid_t can_id, canid_t mask,
> */
>
> if (!r) {
> - printk(KERN_ERR "BUG: receive list entry not found for "
> + pr_err("BUG: receive list entry not found for "
> "dev %s, id %03X, mask %03X\n",
> DNAME(dev), can_id, mask);
> r = NULL;
> @@ -749,8 +749,7 @@ int can_proto_register(const struct can_proto *cp)
> int err = 0;
>
> if (proto < 0 || proto >= CAN_NPROTO) {
> - printk(KERN_ERR "can: protocol number %d out of range\n",
> - proto);
> + pr_err("can: protocol number %d out of range\n", proto);
> return -EINVAL;
> }
>
> @@ -761,8 +760,7 @@ int can_proto_register(const struct can_proto *cp)
> mutex_lock(&proto_tab_lock);
>
> if (proto_tab[proto]) {
> - printk(KERN_ERR "can: protocol %d already registered\n",
> - proto);
> + pr_err("can: protocol %d already registered\n", proto);
> err = -EBUSY;
> } else
> RCU_INIT_POINTER(proto_tab[proto], cp);
> @@ -816,11 +814,8 @@ 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");
> + if (!d)
> return NOTIFY_DONE;
> - }
> BUG_ON(dev->ml_priv);
> dev->ml_priv = d;
>
> @@ -838,8 +833,8 @@ static int can_notifier(struct notifier_block *nb, unsigned long msg,
> dev->ml_priv = NULL;
> }
> } else
> - printk(KERN_ERR "can: notifier: receive list not "
> - "found for dev %s\n", dev->name);
> + pr_err("can: notifier: receive list not found for dev "
> + "%s\n", dev->name);
>
> spin_unlock(&can_rcvlists_lock);
>
> @@ -927,7 +922,7 @@ static __exit void can_exit(void)
> /* remove created dev_rcv_lists from still registered CAN devices */
> rcu_read_lock();
> for_each_netdev_rcu(&init_net, dev) {
> - if (dev->type == ARPHRD_CAN && dev->ml_priv){
> + if (dev->type == ARPHRD_CAN && dev->ml_priv) {
>
> struct dev_rcv_lists *d = dev->ml_priv;
>
next prev parent reply other threads:[~2013-03-11 7:02 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
2013-03-10 21:15 ` [PATCHv2] " Valentin Ilie
2013-03-11 7:02 ` Oliver Hartkopp [this message]
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=513D8193.3080405@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=davem@davemloft.net \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=valentin.ilie@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.