From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kefeng Wang Subject: [PATCH 01/18] netfilter: cleanup: delete Macro PRINTR Date: Tue, 15 Oct 2013 19:44:57 +0800 Message-ID: <1381837514-50660-2-git-send-email-wangkefeng.wang@huawei.com> References: <1381837514-50660-1-git-send-email-wangkefeng.wang@huawei.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Greg Kroah-Hartman , "David S. Miller" , Pablo Neira Ayuso , "Stephen Hemminger" , Johannes Berg , "John W. Linville" , Stanislaw Gruszka , Johannes Berg , Francois Romieu , "Ben Hutchings" , Chas Williams , Marc Kleine-Budde , Samuel Ortiz , Paul Mackerras , Oliver Neukum , Konrad Rzeszutek Wilk , "Boris Ostrovsky" , David Vrabel , Rusty Russell , "Michael S. Tsirkin" , , Return-path: In-Reply-To: <1381837514-50660-1-git-send-email-wangkefeng.wang@huawei.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Macro PRINTR is only used once in nfnetlink_log.c, so it can be replaced by helper function net_err_ratelimited(). Signed-off-by: Kefeng Wang --- net/netfilter/nfnetlink_log.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index d92cc31..8713111 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -47,9 +47,6 @@ #define NFULNL_QTHRESH_DEFAULT 100 /* 100 packets */ #define NFULNL_COPY_RANGE_MAX 0xFFFF /* max packet size is limited by 16-bit struct nfattr nfa_len field */ -#define PRINTR(x, args...) do { if (net_ratelimit()) \ - printk(x, ## args); } while (0); - struct nfulnl_instance { struct hlist_node hlist; /* global list of instances */ spinlock_t lock; @@ -587,7 +584,7 @@ __build_packet_message(struct nfnl_log_net *log, return 0; nla_put_failure: - PRINTR(KERN_ERR "nfnetlink_log: error creating log nlmsg\n"); + net_err_ratelimited("nfnetlink_log: error creating log nlmsg\n"); return -1; } -- 1.8.2.1