Skip to content

Commit fc412a6

Browse files
Tom Rixchucklever
authored andcommitted
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 <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent 340086d commit fc412a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/lockd/svc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ static const unsigned long nlm_grace_period_min = 0;
7777
static const unsigned long nlm_grace_period_max = 240;
7878
static const unsigned long nlm_timeout_min = 3;
7979
static const unsigned long nlm_timeout_max = 20;
80-
static const int nlm_port_min = 0, nlm_port_max = 65535;
8180

8281
#ifdef CONFIG_SYSCTL
82+
static const int nlm_port_min = 0, nlm_port_max = 65535;
8383
static struct ctl_table_header * nlm_sysctl_table;
8484
#endif
8585

0 commit comments

Comments
 (0)