net_XXX_ratelimited() is called to simplify code. Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> --- 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 netfilter" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html