[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1381837514-50660-12-git-send-email-wangkefeng.wang@huawei.com>
Date: Tue, 15 Oct 2013 19:45:07 +0800
From: Kefeng Wang <wangkefeng.wang@...wei.com>
To: <linux-kernel@...r.kernel.org>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"David S. Miller" <davem@...emloft.net>,
Pablo Neira Ayuso <pablo@...filter.org>,
"Stephen Hemminger" <stephen@...workplumber.org>,
Johannes Berg <johannes@...solutions.net>,
"John W. Linville" <linville@...driver.com>,
Stanislaw Gruszka <sgruszka@...hat.com>,
Johannes Berg <johannes.berg@...el.com>,
Francois Romieu <romieu@...zoreil.com>,
"Ben Hutchings" <bhutchings@...arflare.com>,
Chas Williams <chas@....nrl.navy.mil>,
Marc Kleine-Budde <mkl@...gutronix.de>,
Samuel Ortiz <samuel@...tiz.org>,
Paul Mackerras <paulus@...ba.org>,
Oliver Neukum <oneukum@...e.de>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
"Boris Ostrovsky" <boris.ostrovsky@...cle.com>,
David Vrabel <david.vrabel@...rix.com>,
Rusty Russell <rusty@...tcorp.com.au>,
"Michael S. Tsirkin" <mst@...hat.com>, <netfilter@...r.kernel.org>,
<netdev@...r.kernel.org>, <linux-wireless@...r.kernel.org>,
<guohanjun@...wei.com>
Subject: [PATCH 11/18] net: hamradio: use wrapper functions of net_ratelimit() to simplify code
net_XXX_ratelimited() is called to simplify code.
Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
---
drivers/net/hamradio/6pack.c | 3 +--
drivers/net/hamradio/bpqether.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 1450e33..9e97eba 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -237,8 +237,7 @@ static void sp_encaps(struct sixpack *sp, unsigned char *icp, int len)
out_drop:
sp->dev->stats.tx_dropped++;
netif_start_queue(sp->dev);
- if (net_ratelimit())
- printk(KERN_DEBUG "%s: %s - dropped.\n", sp->dev->name, msg);
+ net_dbg_ratelimited("%s: %s - dropped.\n", sp->dev->name, msg);
}
/* Encapsulate an IP datagram and kick it into a TTY queue. */
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index f91bf0d..1522b4a 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -269,8 +269,7 @@ static netdev_tx_t bpq_xmit(struct sk_buff *skb, struct net_device *dev)
* space for the BPQ headers.
*/
if (skb_cow(skb, AX25_BPQ_HEADER_LEN)) {
- if (net_ratelimit())
- pr_err("bpqether: out of memory\n");
+ net_err_ratelimited("pqether: out of memory\n");
kfree_skb(skb);
return NETDEV_TX_OK;
--
1.8.2.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists