[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9BBC4E0CF881AA4299206E2E1412B6264D263037@ORSMSX102.amr.corp.intel.com>
Date: Mon, 11 Feb 2013 17:27:51 +0000
From: "Wyborny, Carolyn" <carolyn.wyborny@...el.com>
To: Ben Hutchings <bhutchings@...arflare.com>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"gospo@...hat.com" <gospo@...hat.com>,
"sassmann@...hat.com" <sassmann@...hat.com>
Subject: RE: [net-next 04/10] igb: Fix for sparse warning in
igb_get_i2c_client
> -----Original Message-----
> From: netdev-owner@...r.kernel.org [mailto:netdev-owner@...r.kernel.org]
> On Behalf Of Ben Hutchings
> Sent: Monday, February 11, 2013 9:06 AM
> To: Kirsher, Jeffrey T; Wyborny, Carolyn
> 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
Yes, my mistake in taking a quick suggestion without enough evaluation. I'm in the process of completely redoing this to not allocate clients on the fly which will fully fix this problem and the initial one.
Thanks,
Carolyn
Powered by blists - more mailing lists