public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Gong Ruiqi <gongruiqi1@huawei.com>
Cc: Wang Weiyang <wangweiyang2@huawei.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] drivers/base/node.c: make CACHE_ATTR define static DEVICE_ATTR_RO
Date: Thu, 13 May 2021 15:50:43 +0200	[thread overview]
Message-ID: <YJ0usxH4Li+fPRUf@kroah.com> (raw)
In-Reply-To: <017d9fae-328f-e93f-095e-bdfa0cc2f2ff@huawei.com>

On Thu, May 13, 2021 at 09:22:44PM +0800, Gong Ruiqi wrote:
> 
> 
> On 2021/05/13 19:26, Greg Kroah-Hartman wrote:
> > 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?
> 
> Sorry for not making it clear enough. Actually the patch does fix them all.
> Those symbols reported by Sparse are generated when two of the following
> macros are expanded:
> 
>     CACHE_ATTR(size, "%llu")
>     CACHE_ATTR(line_size, "%u")
>     CACHE_ATTR(indexing, "%u")
>     CACHE_ATTR(write_policy, "%u")
> 
> So one fix of the CACHE_ATTR's definition fixs them all.

Ok, can you please rewrite the changelog text to make it more clear?

thanks,

greg k-h

  reply	other threads:[~2021-05-13 13:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13 11:07 [PATCH -next] drivers/base/node.c: make CACHE_ATTR define static DEVICE_ATTR_RO Ruiqi Gong
2021-05-13 11:26 ` Greg Kroah-Hartman
2021-05-13 13:22   ` Gong Ruiqi
2021-05-13 13:50     ` Greg Kroah-Hartman [this message]
2021-05-13 13:49   ` Gong Ruiqi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YJ0usxH4Li+fPRUf@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=gongruiqi1@huawei.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wangweiyang2@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox