From: Jeff Layton <jlayton@kernel.org>
To: Tom Rix <trix@redhat.com>,
chuck.lever@oracle.com, trond.myklebust@hammerspace.com,
anna@kernel.org
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lockd: define nlm_port_min,max with CONFIG_SYSCTL
Date: Tue, 02 May 2023 14:16:50 -0400 [thread overview]
Message-ID: <f1b5a29c393e2f6b23420bfc94beceff1be69ae7.camel@kernel.org> (raw)
In-Reply-To: <20230502180713.2930022-1-trix@redhat.com>
On Tue, 2023-05-02 at 14:07 -0400, Tom Rix wrote:
> gcc with W=1 and ! CONFIG_SYSCTL
> fs/lockd/svc.c:80:51: error: ‘nlm_port_max’ defined but not used [-Werror=unused-const-variable=]
> 80 | static const int nlm_port_min = 0, nlm_port_max = 65535;
> | ^~~~~~~~~~~~
> fs/lockd/svc.c:80:33: error: ‘nlm_port_min’ defined but not used [-Werror=unused-const-variable=]
> 80 | static const int nlm_port_min = 0, nlm_port_max = 65535;
> | ^~~~~~~~~~~~
>
> The only use of these variables is when CONFIG_SYSCTL
> is defined, so their definition should be likewise conditional.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
> fs/lockd/svc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
> index bb94949bc223..04ba95b83d16 100644
> --- a/fs/lockd/svc.c
> +++ b/fs/lockd/svc.c
> @@ -77,9 +77,9 @@ static const unsigned long nlm_grace_period_min = 0;
> static const unsigned long nlm_grace_period_max = 240;
> static const unsigned long nlm_timeout_min = 3;
> static const unsigned long nlm_timeout_max = 20;
> -static const int nlm_port_min = 0, nlm_port_max = 65535;
>
> #ifdef CONFIG_SYSCTL
> +static const int nlm_port_min = 0, nlm_port_max = 65535;
> static struct ctl_table_header * nlm_sysctl_table;
> #endif
>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2023-05-02 18:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-02 18:07 Tom Rix
2023-05-02 18:16 ` Jeff Layton [this message]
2023-05-02 19:50 ` Chuck Lever III
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=f1b5a29c393e2f6b23420bfc94beceff1be69ae7.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=anna@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trix@redhat.com \
--cc=trond.myklebust@hammerspace.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
all inboxes | Powered by JetHome®