aboutsummaryrefslogtreecommitdiffstats
path: root/net/can
diff options
context:
space:
mode:
authorValentin Ilie <valentin.ilie@gmail.com>2013-03-10 07:15:13 -0400
committerDavid S. Miller <davem@davemloft.net>2013-03-11 07:40:17 -0400
commitf4f3efdaf9f0770b69fb2c86f1a67547ad756942 (patch)
tree6cb03d981ae112532142534cde3c0f4fb94060de /net/can
parent73e046839925920eff2085e9238c81f051d9619b (diff)
net: can: af_can.c: Fix checkpatch warnings
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/can')
-rw-r--r--net/can/af_can.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/net/can/af_can.c b/net/can/af_can.c
index c48e5220bbac..8bacf281b3ee 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,
525 525
526 d = find_dev_rcv_lists(dev); 526 d = find_dev_rcv_lists(dev);
527 if (!d) { 527 if (!d) {
528 printk(KERN_ERR "BUG: receive list not found for " 528 pr_err("BUG: receive list not found for "
529 "dev %s, id %03X, mask %03X\n", 529 "dev %s, id %03X, mask %03X\n",
530 DNAME(dev), can_id, mask); 530 DNAME(dev), can_id, mask);
531 goto out; 531 goto out;
@@ -552,7 +552,7 @@ void can_rx_unregister(struct net_device *dev, canid_t can_id, canid_t mask,
552 */ 552 */
553 553
554 if (!r) { 554 if (!r) {
555 printk(KERN_ERR "BUG: receive list entry not found for " 555 pr_err("BUG: receive list entry not found for "
556 "dev %s, id %03X, mask %03X\n", 556 "dev %s, id %03X, mask %03X\n",
557 DNAME(dev), can_id, mask); 557 DNAME(dev), can_id, mask);
558 r = NULL; 558 r = NULL;
@@ -749,8 +749,7 @@ int can_proto_register(const struct can_proto *cp)
749 int err = 0; 749 int err = 0;
750 750
751 if (proto < 0 || proto >= CAN_NPROTO) { 751 if (proto < 0 || proto >= CAN_NPROTO) {
752 printk(KERN_ERR "can: protocol number %d out of range\n", 752 pr_err("can: protocol number %d out of range\n", proto);
753 proto);
754 return -EINVAL; 753 return -EINVAL;
755 } 754 }
756 755
@@ -761,8 +760,7 @@ int can_proto_register(const struct can_proto *cp)
761 mutex_lock(&proto_tab_lock); 760 mutex_lock(&proto_tab_lock);
762 761
763 if (proto_tab[proto]) { 762 if (proto_tab[proto]) {
764 printk(KERN_ERR "can: protocol %d already registered\n", 763 pr_err("can: protocol %d already registered\n", proto);
765 proto);
766 err = -EBUSY; 764 err = -EBUSY;
767 } else 765 } else
768 RCU_INIT_POINTER(proto_tab[proto], cp); 766 RCU_INIT_POINTER(proto_tab[proto], cp);
@@ -816,11 +814,8 @@ static int can_notifier(struct notifier_block *nb, unsigned long msg,
816 814
817 /* create new dev_rcv_lists for this device */ 815 /* create new dev_rcv_lists for this device */
818 d = kzalloc(sizeof(*d), GFP_KERNEL); 816 d = kzalloc(sizeof(*d), GFP_KERNEL);
819 if (!d) { 817 if (!d)
820 printk(KERN_ERR
821 "can: allocation of receive list failed\n");
822 return NOTIFY_DONE; 818 return NOTIFY_DONE;
823 }
824 BUG_ON(dev->ml_priv); 819 BUG_ON(dev->ml_priv);
825 dev->ml_priv = d; 820 dev->ml_priv = d;
826 821
@@ -838,8 +833,8 @@ static int can_notifier(struct notifier_block *nb, unsigned long msg,
838 dev->ml_priv = NULL; 833 dev->ml_priv = NULL;
839 } 834 }
840 } else 835 } else
841 printk(KERN_ERR "can: notifier: receive list not " 836 pr_err("can: notifier: receive list not found for dev "
842 "found for dev %s\n", dev->name); 837 "%s\n", dev->name);
843 838
844 spin_unlock(&can_rcvlists_lock); 839 spin_unlock(&can_rcvlists_lock);
845 840
@@ -927,7 +922,7 @@ static __exit void can_exit(void)
927 /* remove created dev_rcv_lists from still registered CAN devices */ 922 /* remove created dev_rcv_lists from still registered CAN devices */
928 rcu_read_lock(); 923 rcu_read_lock();
929 for_each_netdev_rcu(&init_net, dev) { 924 for_each_netdev_rcu(&init_net, dev) {
930 if (dev->type == ARPHRD_CAN && dev->ml_priv){ 925 if (dev->type == ARPHRD_CAN && dev->ml_priv) {
931 926
932 struct dev_rcv_lists *d = dev->ml_priv; 927 struct dev_rcv_lists *d = dev->ml_priv;
933 928