lockd: define nlm_port_min,max with CONFIG_SYSCTL
JIRA: https://issues.redhat.com/browse/RHEL-73723 commit fc412a6196a6f46ece0e6e6b118556464f165800 Author: Tom Rix <trix@redhat.com> Date: Tue May 2 14:07:13 2023 -0400 lockd: define nlm_port_min,max with CONFIG_SYSCTL 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> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
This commit is contained in:
parent
eda6883f2c
commit
a969c35f28
|
@ -81,9 +81,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
|
||||
|
||||
|
|
Loading…
Reference in New Issue