[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1360602355.2701.5.camel@bwh-desktop.uk.solarflarecom.com>
Date: Mon, 11 Feb 2013 17:05:55 +0000
From: Ben Hutchings <bhutchings@...arflare.com>
To: Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Carolyn Wyborny <carolyn.wyborny@...el.com>
CC: <davem@...emloft.net>, <netdev@...r.kernel.org>,
<gospo@...hat.com>, <sassmann@...hat.com>
Subject: Re: [net-next 04/10] igb: Fix for sparse warning in
igb_get_i2c_client
On Fri, 2013-02-08 at 02:39 -0800, Jeff Kirsher wrote:
> From: Carolyn Wyborny <carolyn.wyborny@...el.com>
>
> This patch changes definition of i2c_client in igb_get_i2c_client to static
> to prevent sparse warning.
So, in order to fix the warning:
drivers/net/ethernet/intel/igb/igb_main.c:7611:19: warning: symbol 'igb_get_i2c_client' was not declared. Should it be static?
you don't touch the function declaration, but instead make a local
variable static. This doesn't fix the warning, but does introduce a
race condition...
Ben.
> Reported-by: Fengguang Wu <fengguang.wu@...el.com>
> Signed-off-by: Carolyn Wyborny <carolyn.wyborny@...el.com>
> Tested-by: Aaron Brown <aaron.f.brown@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> ---
> drivers/net/ethernet/intel/igb/igb_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
> index c19a35c..ebf8384 100644
> --- a/drivers/net/ethernet/intel/igb/igb_main.c
> +++ b/drivers/net/ethernet/intel/igb/igb_main.c
> @@ -7732,7 +7732,7 @@ igb_get_i2c_client(struct igb_adapter *adapter, u8 dev_addr)
> {
> ulong flags;
> struct igb_i2c_client_list *client_list;
> - struct i2c_client *client = NULL;
> + static struct i2c_client *client;
> struct i2c_board_info client_info = {
> I2C_BOARD_INFO("igb", 0x00),
> };
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
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