Skip to content

Commit

Permalink
net/can: use printk_ratelimited() instead of printk_ratelimit()
Browse files Browse the repository at this point in the history
Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited().

Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
  • Loading branch information
Manuel Zerpies authored and David S. Miller committed Jun 17, 2011
1 parent c63d6ea commit d751e62
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/can/af_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
#include <linux/skbuff.h>
#include <linux/can.h>
#include <linux/can/core.h>
#include <linux/ratelimit.h>
#include <net/net_namespace.h>
#include <net/sock.h>

Expand Down Expand Up @@ -161,8 +162,8 @@ static int can_create(struct net *net, struct socket *sock, int protocol,
* return the error code immediately. Below we will
* return -EPROTONOSUPPORT
*/
if (err && printk_ratelimit())
printk(KERN_ERR "can: request_module "
if (err)
printk_ratelimited(KERN_ERR "can: request_module "
"(can-proto-%d) failed.\n", protocol);

cp = can_get_proto(protocol);
Expand Down

0 comments on commit d751e62

Please sign in to comment.