Skip to content

Commit 5ec3994

Browse files
committed
NFSD: Rewrite synopsis of nfsd_percpu_counters_init()
In function ‘export_stats_init’, inlined from ‘svc_export_alloc’ at fs/nfsd/export.c:866:6: fs/nfsd/export.c:337:16: warning: ‘nfsd_percpu_counters_init’ accessing 40 bytes in a region of size 0 [-Wstringop-overflow=] 337 | return nfsd_percpu_counters_init(&stats->counter, EXP_STATS_COUNTERS_NUM); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/nfsd/export.c:337:16: note: referencing argument 1 of type ‘struct percpu_counter[0]’ fs/nfsd/stats.h: In function ‘svc_export_alloc’: fs/nfsd/stats.h:40:5: note: in a call to function ‘nfsd_percpu_counters_init’ 40 | int nfsd_percpu_counters_init(struct percpu_counter counters[], int num); | ^~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent afb8aae commit 5ec3994

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

fs/nfsd/stats.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static int nfsd_show(struct seq_file *seq, void *v)
7676

7777
DEFINE_PROC_SHOW_ATTRIBUTE(nfsd);
7878

79-
int nfsd_percpu_counters_init(struct percpu_counter counters[], int num)
79+
int nfsd_percpu_counters_init(struct percpu_counter *counters, int num)
8080
{
8181
int i, err = 0;
8282

fs/nfsd/stats.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ extern struct nfsd_stats nfsdstats;
3737

3838
extern struct svc_stat nfsd_svcstats;
3939

40-
int nfsd_percpu_counters_init(struct percpu_counter counters[], int num);
41-
void nfsd_percpu_counters_reset(struct percpu_counter counters[], int num);
42-
void nfsd_percpu_counters_destroy(struct percpu_counter counters[], int num);
40+
int nfsd_percpu_counters_init(struct percpu_counter *counters, int num);
41+
void nfsd_percpu_counters_reset(struct percpu_counter *counters, int num);
42+
void nfsd_percpu_counters_destroy(struct percpu_counter *counters, int num);
4343
int nfsd_stat_init(void);
4444
void nfsd_stat_shutdown(void);
4545

0 commit comments

Comments
 (0)