Re: [PATCH -next] drivers/base/node.c: make CACHE_ATTR define static DEVICE_ATTR_RO

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

 



On Thu, May 13, 2021 at 07:07:16PM +0800, Ruiqi Gong wrote:
> The Sparse tool reports as follows:
> 
> drivers/base/node.c:239:1: warning:
>  symbol 'dev_attr_line_size' was not declared. Should it be static?
> drivers/base/node.c:240:1: warning:
>  symbol 'dev_attr_indexing' was not declared. Should it be static?
> 
> These symbols (and several others) are defined by DEVICE_ATTR_RO(name) in
> CACHE_ATTR(name, fmt), and all of them are not used outside of node.c. So let's
> mark DEVICE_ATTR_RO(name) static to solve these complains from Sparse.

Why not fix them all at once?  Why only one here?

thanks,

greg k-h



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux