From: Luis Chamberlain <mcgrof@kernel.org>
To: Palmer Dabbelt <palmer@rivosinc.com>
Cc: keescook@chromium.org, yzaikin@google.com,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] perf_events: sysctl: Avoid unused one_thousand definition
Date: Thu, 20 Jan 2022 06:50:27 -0800 [thread overview]
Message-ID: <Yel2sz+D8p1BVHk6@bombadil.infradead.org> (raw)
In-Reply-To: <20220119194019.27703-1-palmer@rivosinc.com>
On Wed, Jan 19, 2022 at 11:40:19AM -0800, Palmer Dabbelt wrote:
> From: Palmer Dabbelt <palmer@rivosinc.com>
>
> The variable "one_thousand" is only used under CONFIG_PERF_EVENTS=y, but
> is unconditionally defined. This can fire a warning.
>
> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
>
> ---
>
> I went with an #ifdef instead of a __maybe_unused because that's what
> the other code is using, and I left the one_thousand in order despite
> that requiring another #ifdef.
> ---
> kernel/sysctl.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index ef77be575d87..81a6f2d47f77 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -122,7 +122,9 @@ static unsigned long one_ul = 1;
> static unsigned long long_max = LONG_MAX;
> static int one_hundred = 100;
> static int two_hundred = 200;
> +#ifdef CONFIG_PERF_EVENTS
> static int one_thousand = 1000;
> +#endif
Please use linux-next, this has changed quite a bit there.
You can git grep for SYSCTL_ONE_THOUSAND.
Luis
prev parent reply other threads:[~2022-01-20 14:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 19:40 [PATCH] perf_events: sysctl: Avoid unused one_thousand definition Palmer Dabbelt
2022-01-20 14:50 ` Luis Chamberlain [this message]
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=Yel2sz+D8p1BVHk6@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=palmer@rivosinc.com \
--cc=yzaikin@google.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;
as well as URLs for NNTP newsgroup(s).