Re: [PATCH] staging: cxt1e1: Fix static symbol sparse warnings for global vars in linux.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 22, 2014 at 01:17:22PM -0700, Greg KH wrote:
> On Tue, Jul 22, 2014 at 04:07:51PM -0400, Jeff Oczek wrote:
> > Put extern declarations in cxt1e1_common.h to reduce sparse warnings for linux.c:
> 
> I know you didn't name this variable, but wow, that's a horrid name for
> a global variable :)
> 
> Any way you could change this to first fix up the name of the variable
> to something a bit more "device-specific" first, before this patch?
> 
> Perhaps "cxt1e1_error_flag"?
> 
> > +extern int cxt1e1_max_mru;
> > +extern int cxt1e1_max_mtu;
> 
> These are fine.
> 
> > +extern int max_mtu_default;
> > +extern int max_txdesc_used;
> > +extern int max_txdesc_default;
> > +extern int max_rxdesc_used;
> > +extern int max_rxdesc_default;
> 
> Again, these are bad names, can you do the same thing here?
> 
> thanks,
> 
> greg k-h

Hi Greg,

max_txdesc_used and max_rxdesc_used are module parameters, 
is it ok to change them?  I'm quite new to this -- I don't know if that
would count as breaking userspace or not.

If not allowed, I could go the route of changing these less descriptive ones
to static in the main file and then make an assignment to the global vars
during the module init.

Or I can just leave the module params be and change the other globals.

Any of those sound good?

Thanks,
Jeff
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux