* [PATCH] lockd: define nlm_port_min,max with CONFIG_SYSCTL
@ 2023-05-02 18:07 Tom Rix
2023-05-02 18:16 ` Jeff Layton
0 siblings, 1 reply; 3+ messages in thread
From: Tom Rix @ 2023-05-02 18:07 UTC (permalink / raw)
To: chuck.lever, jlayton, trond.myklebust, anna
Cc: linux-nfs, linux-kernel, Tom Rix
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
--
2.27.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] lockd: define nlm_port_min,max with CONFIG_SYSCTL
2023-05-02 18:07 [PATCH] lockd: define nlm_port_min,max with CONFIG_SYSCTL Tom Rix
@ 2023-05-02 18:16 ` Jeff Layton
2023-05-02 19:50 ` Chuck Lever III
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Layton @ 2023-05-02 18:16 UTC (permalink / raw)
To: Tom Rix, chuck.lever, trond.myklebust, anna; +Cc: linux-nfs, linux-kernel
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] lockd: define nlm_port_min,max with CONFIG_SYSCTL
2023-05-02 18:16 ` Jeff Layton
@ 2023-05-02 19:50 ` Chuck Lever III
0 siblings, 0 replies; 3+ messages in thread
From: Chuck Lever III @ 2023-05-02 19:50 UTC (permalink / raw)
To: Tom Rix
Cc: Jeff Layton, Trond Myklebust, Anna Schumaker,
Linux NFS Mailing List, Linux Kernel Mailing List
> On May 2, 2023, at 2:16 PM, Jeff Layton <jlayton@kernel.org> wrote:
>
> 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>
Provisionally applied to nfsd-fixes. Thanks!
--
Chuck Lever
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-05-02 19:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02 18:07 [PATCH] lockd: define nlm_port_min,max with CONFIG_SYSCTL Tom Rix
2023-05-02 18:16 ` Jeff Layton
2023-05-02 19:50 ` Chuck Lever III
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®