[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1381854263.22110.19.camel@joe-AO722>
Date: Tue, 15 Oct 2013 09:24:23 -0700
From: Joe Perches <joe@...ches.com>
To: Kefeng Wang <wangkefeng.wang@...wei.com>
Cc: linux-kernel@...r.kernel.org,
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: Re: [PATCH 02/18] net: use wrapper functions of net_ratelimit() to
simplify code
On Tue, 2013-10-15 at 19:44 +0800, Kefeng Wang wrote:
> Wrapper functions net_ratelimited_function() and net_XXX_ratelimited()
> are called to simplify code.
[]
> diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
[]
> @@ -465,10 +465,8 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
> if (likely(fdb)) {
> /* attempt to update an entry for a local interface */
> if (unlikely(fdb->is_local)) {
> - if (net_ratelimit())
> - br_warn(br, "received packet on %s with "
> - "own address as source address\n",
> - source->dev->name);
> + net_ratelimited_function(br_warn, br, "received packet on %s "
> + "with own address as source address\n", source->dev->name);
Hello Kefeng.
When these types of lines are changed, please coalesce the
fragmented format pieces into a single string.
It makes grep a bit easier and 80 columns limits don't
apply to formats.
I think using net_ratelimited_function is not particularly
clarifying here.
Maybe net_ratelimited_function should be removed instead
of its use sites expanded.
Perhaps adding macros like #define br_warn_ratelimited()
would be better.
This comment applies to the whole series.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists