diff options
author | Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de> | 2011-06-04 17:35:58 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-28 14:29:19 -0700 |
commit | 7a2eaf9358250706672783eb8511835706b0922b (patch) | |
tree | 05c359185ae08552506aa41fbe9ca6d0d1d10e48 /drivers/staging/octeon/ethernet-rx.c | |
parent | 9d17653c721aa7f7c823d6ebc554e2c03ce35fbd (diff) |
staging: octeon: use printk_ratelimited instead of printk_ratelimit
As per printk_ratelimit comment, it should not be used
Signed-off-by: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/octeon/ethernet-rx.c')
-rw-r--r-- | drivers/staging/octeon/ethernet-rx.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c index cb38f9eb2cc..0f22f0f4744 100644 --- a/drivers/staging/octeon/ethernet-rx.c +++ b/drivers/staging/octeon/ethernet-rx.c @@ -34,6 +34,7 @@ #include <linux/ip.h> #include <linux/string.h> #include <linux/prefetch.h> +#include <linux/ratelimit.h> #include <linux/smp.h> #include <net/dst.h> #ifdef CONFIG_XFRM @@ -186,13 +187,13 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work) if (*ptr == 0xd5) { /* - DEBUGPRINT("Port %d received 0xd5 preamble\n", work->ipprt); + printk_ratelimited("Port %d received 0xd5 preamble\n", work->ipprt); */ work->packet_ptr.s.addr += i + 1; work->len -= i + 5; } else if ((*ptr & 0xf) == 0xd) { /* - DEBUGPRINT("Port %d received 0x?d preamble\n", work->ipprt); + printk_ratelimited("Port %d received 0x?d preamble\n", work->ipprt); */ work->packet_ptr.s.addr += i; work->len -= i + 4; @@ -203,9 +204,9 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work) ptr++; } } else { - DEBUGPRINT("Port %d unknown preamble, packet " - "dropped\n", - work->ipprt); + printk_ratelimited("Port %d unknown preamble, packet " + "dropped\n", + work->ipprt); /* cvmx_helper_dump_packet(work); */ @@ -214,8 +215,8 @@ static inline int cvm_oct_check_rcv_error(cvmx_wqe_t *work) } } } else { - DEBUGPRINT("Port %d receive error code %d, packet dropped\n", - work->ipprt, work->word2.snoip.err_code); + printk_ratelimited("Port %d receive error code %d, packet dropped\n", + work->ipprt, work->word2.snoip.err_code); cvm_oct_free_work(work); return 1; } @@ -334,8 +335,9 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) */ skb = dev_alloc_skb(work->len); if (!skb) { - DEBUGPRINT("Port %d failed to allocate skbuff, packet dropped\n", - work->ipprt); + printk_ratelimited("Port %d failed to allocate " + "skbuff, packet dropped\n", + work->ipprt); cvm_oct_free_work(work); continue; } @@ -429,7 +431,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) } else { /* Drop any packet received for a device that isn't up */ /* - DEBUGPRINT("%s: Device not up, packet dropped\n", + printk_ratelimited("%s: Device not up, packet dropped\n", dev->name); */ #ifdef CONFIG_64BIT @@ -444,7 +446,7 @@ static int cvm_oct_napi_poll(struct napi_struct *napi, int budget) * Drop any packet received for a device that * doesn't exist. */ - DEBUGPRINT("Port %d not controlled by Linux, packet dropped\n", + printk_ratelimited("Port %d not controlled by Linux, packet dropped\n", work->ipprt); dev_kfree_skb_irq(skb); } |