Staging: lustre: obdclass: Declare function as static
PATCH 1/1 Staging: lustre: obdclass: Declare function as static
Declare the function cache_stats_print as static since it is used only in this file. Used grep to find occurences. Problem found using sparse.
Signed-off-by Bhumika Goyal <[email protected]>
--- drivers/staging/lustre/lustre/obdclass/cl_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/lustre/lustre/obdclass/cl_object.c +2 -1
@@ -362,7 +362,8 @@ void cache_stats_init(struct cache_stats *cs, const char *name)atomic_set (&cs->cs_stats[i],0 ); } -int cache_stats_print (const struct cache_stats *cs,struct seq_file *m,int h) +static int cache_stats_print (const struct cache_stats *cs, +struct seq_file *m,int h) {int i;/*
Signature · 1 line
1.9.1
Quoted 3 lines · Bhumika Goyal
Declare the function
cache_stats_printas static since it is used only in this file. Used grep to find occurences. Problem found using sparse.
Good idea. You may also find some functions that are simply not used at all.
julia
Quoted 30 lines
Signed-off-by Bhumika Goyal <[email protected]>--- drivers/staging/lustre/lustre/obdclass/cl_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/staging/lustre/lustre/obdclass/cl_object.c +2
-1@@ -362,7 +362,8 @@ void cache_stats_init(struct cache_stats *cs, const char *name)atomic_set (&cs->cs_stats[i],0 ); } -int cache_stats_print (const struct cache_stats *cs,struct seq_file *m,int h) +static int cache_stats_print (const struct cache_stats *cs, +struct seq_file *m,int h) {int i;/* Signature · 8 lines
1.9.1 -- You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1455258208-7768-1-git-send-email-bhumirks%40gmail.com. For more options, visit https://groups.google.com/d/optout.
I am surely sending some patches for removing unused functions. Thanks,
Bhumika