* [PATCH] staging: lustre: lustre: lmv: fix sparse warnings about static declarations
@ 2015-02-03 15:24 Mohammad Jamal
2015-02-03 17:29 ` Sudip Mukherjee
0 siblings, 1 reply; 2+ messages in thread
From: Mohammad Jamal @ 2015-02-03 15:24 UTC (permalink / raw)
To: oleg.drokin, andreas.dilger, gregkh
Cc: HPDD-discuss, devel, linux-kernel, Mohammad Jamal
This patch adds a static keyword to lprocfs_lmv_init_vars and
lprocfs_lmv_module_vars to suppress the sparse warnings about
static declaration
Signed-off-by: Mohammad Jamal <md.jamalmohiuddin@gmail.com>
---
drivers/staging/lustre/lustre/lmv/lproc_lmv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/lmv/lproc_lmv.c b/drivers/staging/lustre/lustre/lmv/lproc_lmv.c
index 5be4176..804476b 100644
--- a/drivers/staging/lustre/lustre/lmv/lproc_lmv.c
+++ b/drivers/staging/lustre/lustre/lmv/lproc_lmv.c
@@ -215,7 +215,7 @@ static struct lprocfs_vars lprocfs_lmv_module_vars[] = {
{ NULL }
};
-struct file_operations lmv_proc_target_fops = {
+static struct file_operations lmv_proc_target_fops = {
.owner = THIS_MODULE,
.open = lmv_target_seq_open,
.read = seq_read,
@@ -223,7 +223,7 @@ struct file_operations lmv_proc_target_fops = {
.release = seq_release,
};
-void lprocfs_lmv_init_vars(struct lprocfs_static_vars *lvars)
+static void lprocfs_lmv_init_vars(struct lprocfs_static_vars *lvars)
{
lvars->module_vars = lprocfs_lmv_module_vars;
lvars->obd_vars = lprocfs_lmv_obd_vars;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: lustre: lustre: lmv: fix sparse warnings about static declarations
2015-02-03 15:24 [PATCH] staging: lustre: lustre: lmv: fix sparse warnings about static declarations Mohammad Jamal
@ 2015-02-03 17:29 ` Sudip Mukherjee
0 siblings, 0 replies; 2+ messages in thread
From: Sudip Mukherjee @ 2015-02-03 17:29 UTC (permalink / raw)
To: Mohammad Jamal
Cc: oleg.drokin, andreas.dilger, gregkh, HPDD-discuss, devel,
linux-kernel
On Tue, Feb 03, 2015 at 08:54:45PM +0530, Mohammad Jamal wrote:
> This patch adds a static keyword to lprocfs_lmv_init_vars and
> lprocfs_lmv_module_vars to suppress the sparse warnings about
> static declaration
have you build tested your patch?
After your patch:
drivers/staging/lustre/lustre/lmv/lproc_lmv.c:218:31: warning: ‘lmv_proc_target_fops’ defined but not used [-Wunused-variable]
drivers/staging/lustre/lustre/lmv/lproc_lmv.c:226:13: warning: ‘lprocfs_lmv_init_vars’ defined but not used [-Wunused-function]
WARNING: "lprocfs_lmv_init_vars" [drivers/staging/lustre/lustre/lmv/lmv.ko] undefined!
WARNING: "lmv_proc_target_fops" [drivers/staging/lustre/lustre/lmv/lmv.ko] undefined!
regards
sudip
>
> Signed-off-by: Mohammad Jamal <md.jamalmohiuddin@gmail.com>
> ---
<snip>
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-03 17:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-03 15:24 [PATCH] staging: lustre: lustre: lmv: fix sparse warnings about static declarations Mohammad Jamal
2015-02-03 17:29 ` Sudip Mukherjee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox