diff mbox

[OPW,kernel,04/10] staging:lustre: Fix plain integer as NULL pointer warning

Message ID 6c3775f6dd679331a14da137745dbde80f7d5e30.1383233124.git.dulshani.gunawardhana89@gmail.com
State New, archived
Headers show

Commit Message

Dulshani Gunawardhana Oct. 31, 2013, 3:32 p.m. UTC
Fix the following sparse warnings in lproc_lov.c.

drivers/staging/lustre/lustre/lov/lproc_lov.c:263:51: warning: Using
plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lproc_lov.c:264:51: warning: Using
plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lproc_lov.c:265:51: warning: Using
plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lproc_lov.c:266:51: warning: Using
plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lproc_lov.c:267:51: warning: Using
plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lproc_lov.c:268:51: warning: Using
plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lproc_lov.c:269:51: warning: Using
plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lproc_lov.c:270:51: warning: Using
plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lproc_lov.c:271:51: warning: Using
plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lproc_lov.c:273:51: warning: Using
plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lproc_lov.c:274:51: warning: Using
plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lproc_lov.c:275:51: warning: Using
plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lproc_lov.c:276:51: warning: Using
plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lproc_lov.c:277:51: warning: Using
plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lproc_lov.c:278:11: warning: Using
plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lproc_lov.c:284:50: warning: Using
plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lproc_lov.c:285:11: warning: Using
plain integer as NULL pointer

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
---
 drivers/staging/lustre/lustre/lov/lproc_lov.c | 36 +++++++++++++--------------
 1 file changed, 18 insertions(+), 18 deletions(-)

Comments

Greg Kroah-Hartman Oct. 31, 2013, 3:46 p.m. UTC | #1
On Thu, Oct 31, 2013 at 09:02:01PM +0530, Dulshani Gunawardhana wrote:
> Fix the following sparse warnings in lproc_lov.c.
> 
> drivers/staging/lustre/lustre/lov/lproc_lov.c:263:51: warning: Using
> plain integer as NULL pointer

Your error messages are line-wrapped :(

And you only need to include one of them, not all 20+...

Care to resend this?

thanks,

greg k-h
diff mbox

Patch

diff --git a/drivers/staging/lustre/lustre/lov/lproc_lov.c b/drivers/staging/lustre/lustre/lov/lproc_lov.c
index 15744e1..e6f22e3 100644
--- a/drivers/staging/lustre/lustre/lov/lproc_lov.c
+++ b/drivers/staging/lustre/lustre/lov/lproc_lov.c
@@ -260,29 +260,29 @@  LPROC_SEQ_FOPS_RO_TYPE(lov, kbytesfree);
 LPROC_SEQ_FOPS_RO_TYPE(lov, kbytesavail);
 
 struct lprocfs_vars lprocfs_lov_obd_vars[] = {
-	{ "uuid",	  &lov_uuid_fops,	  0, 0 },
-	{ "stripesize",   &lov_stripesize_fops,   0 },
-	{ "stripeoffset", &lov_stripeoffset_fops, 0 },
-	{ "stripecount",  &lov_stripecount_fops,  0 },
-	{ "stripetype",   &lov_stripetype_fops,   0 },
-	{ "numobd",       &lov_numobd_fops,	  0, 0 },
-	{ "activeobd",    &lov_activeobd_fops,	  0, 0 },
-	{ "filestotal",   &lov_filestotal_fops,   0, 0 },
-	{ "filesfree",    &lov_filesfree_fops,    0, 0 },
-	/*{ "filegroups", lprocfs_rd_filegroups,  0, 0 },*/
-	{ "blocksize",    &lov_blksize_fops,      0, 0 },
-	{ "kbytestotal",  &lov_kbytestotal_fops,  0, 0 },
-	{ "kbytesfree",   &lov_kbytesfree_fops,   0, 0 },
-	{ "kbytesavail",  &lov_kbytesavail_fops,  0, 0 },
-	{ "desc_uuid",    &lov_desc_uuid_fops,    0, 0 },
-	{ 0 }
+	{ "uuid",	  &lov_uuid_fops,	  NULL, 0 },
+	{ "stripesize",   &lov_stripesize_fops,   NULL },
+	{ "stripeoffset", &lov_stripeoffset_fops, NULL },
+	{ "stripecount",  &lov_stripecount_fops,  NULL },
+	{ "stripetype",   &lov_stripetype_fops,   NULL },
+	{ "numobd",       &lov_numobd_fops,	  NULL, 0 },
+	{ "activeobd",    &lov_activeobd_fops,	  NULL, 0 },
+	{ "filestotal",   &lov_filestotal_fops,   NULL, 0 },
+	{ "filesfree",    &lov_filesfree_fops,    NULL, 0 },
+	/*{ "filegroups", lprocfs_rd_filegroups,  NULL, 0 },*/
+	{ "blocksize",    &lov_blksize_fops,      NULL, 0 },
+	{ "kbytestotal",  &lov_kbytestotal_fops,  NULL, 0 },
+	{ "kbytesfree",   &lov_kbytesfree_fops,   NULL, 0 },
+	{ "kbytesavail",  &lov_kbytesavail_fops,  NULL, 0 },
+	{ "desc_uuid",    &lov_desc_uuid_fops,    NULL, 0 },
+	{ NULL }
 };
 
 LPROC_SEQ_FOPS_RO_TYPE(lov, numrefs);
 
 static struct lprocfs_vars lprocfs_lov_module_vars[] = {
-	{ "num_refs",     &lov_numrefs_fops,     0, 0 },
-	{ 0 }
+	{ "num_refs",     &lov_numrefs_fops,     NULL, 0 },
+	{ NULL }
 };
 
 void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars)