]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/decnet/dn_neigh.c
net: Convert net_ratelimit uses to net_<level>_ratelimited
[mirror_ubuntu-artful-kernel.git] / net / decnet / dn_neigh.c
index ee7013f24fcabc2518b3dfa8234e8cade433daa8..ac90f658586cbd0af97f823a6cf86075394befcc 100644 (file)
@@ -162,8 +162,8 @@ static int dn_neigh_construct(struct neighbour *neigh)
        else if ((dev->type == ARPHRD_ETHER) || (dev->type == ARPHRD_LOOPBACK))
                dn_dn2eth(neigh->ha, dn->addr);
        else {
-               if (net_ratelimit())
-                       printk(KERN_DEBUG "Trying to create neigh for hw %d\n",  dev->type);
+               net_dbg_ratelimited("Trying to create neigh for hw %d\n",
+                                   dev->type);
                return -EINVAL;
        }
 
@@ -236,15 +236,13 @@ static int dn_long_output(struct neighbour *neigh, struct sk_buff *skb)
        if (skb_headroom(skb) < headroom) {
                struct sk_buff *skb2 = skb_realloc_headroom(skb, headroom);
                if (skb2 == NULL) {
-                       if (net_ratelimit())
-                               printk(KERN_CRIT "dn_long_output: no memory\n");
+                       net_crit_ratelimited("dn_long_output: no memory\n");
                        kfree_skb(skb);
                        return -ENOBUFS;
                }
                kfree_skb(skb);
                skb = skb2;
-               if (net_ratelimit())
-                       printk(KERN_INFO "dn_long_output: Increasing headroom\n");
+               net_info_ratelimited("dn_long_output: Increasing headroom\n");
        }
 
        data = skb_push(skb, sizeof(struct dn_long_packet) + 3);
@@ -281,15 +279,13 @@ static int dn_short_output(struct neighbour *neigh, struct sk_buff *skb)
        if (skb_headroom(skb) < headroom) {
                struct sk_buff *skb2 = skb_realloc_headroom(skb, headroom);
                if (skb2 == NULL) {
-                       if (net_ratelimit())
-                               printk(KERN_CRIT "dn_short_output: no memory\n");
+                       net_crit_ratelimited("dn_short_output: no memory\n");
                        kfree_skb(skb);
                        return -ENOBUFS;
                }
                kfree_skb(skb);
                skb = skb2;
-               if (net_ratelimit())
-                       printk(KERN_INFO "dn_short_output: Increasing headroom\n");
+               net_info_ratelimited("dn_short_output: Increasing headroom\n");
        }
 
        data = skb_push(skb, sizeof(struct dn_short_packet) + 2);
@@ -322,15 +318,13 @@ static int dn_phase3_output(struct neighbour *neigh, struct sk_buff *skb)
        if (skb_headroom(skb) < headroom) {
                struct sk_buff *skb2 = skb_realloc_headroom(skb, headroom);
                if (skb2 == NULL) {
-                       if (net_ratelimit())
-                               printk(KERN_CRIT "dn_phase3_output: no memory\n");
+                       net_crit_ratelimited("dn_phase3_output: no memory\n");
                        kfree_skb(skb);
                        return -ENOBUFS;
                }
                kfree_skb(skb);
                skb = skb2;
-               if (net_ratelimit())
-                       printk(KERN_INFO "dn_phase3_output: Increasing headroom\n");
+               net_info_ratelimited("dn_phase3_output: Increasing headroom\n");
        }
 
        data = skb_push(skb, sizeof(struct dn_short_packet) + 2);