Commit 2046a81d authored by Himangi Saraogi's avatar Himangi Saraogi Committed by Greg Kroah-Hartman

staging:lustre: Fix sparse warnings of Using plain integer as NULL pointer

This patch fixes the following sparse warnings:

drivers/staging/lustre/lustre/lov/lov_obd.c:342:48: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:647:44: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:771:46: warning: Using plain integer as NULL pointer
Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8505e3fc
...@@ -339,7 +339,7 @@ static int lov_disconnect(struct obd_export *exp) ...@@ -339,7 +339,7 @@ static int lov_disconnect(struct obd_export *exp)
for (i = 0; i < lov->desc.ld_tgt_count; i++) { for (i = 0; i < lov->desc.ld_tgt_count; i++) {
if (lov->lov_tgts[i] && lov->lov_tgts[i]->ltd_exp) { if (lov->lov_tgts[i] && lov->lov_tgts[i]->ltd_exp) {
/* Disconnection is the last we know about an obd */ /* Disconnection is the last we know about an obd */
lov_del_target(obd, i, 0, lov->lov_tgts[i]->ltd_gen); lov_del_target(obd, i, NULL, lov->lov_tgts[i]->ltd_gen);
} }
} }
obd_putref(obd); obd_putref(obd);
...@@ -644,7 +644,7 @@ static int lov_add_target(struct obd_device *obd, struct obd_uuid *uuidp, ...@@ -644,7 +644,7 @@ static int lov_add_target(struct obd_device *obd, struct obd_uuid *uuidp,
if (rc) { if (rc) {
CERROR("add failed (%d), deleting %s\n", rc, CERROR("add failed (%d), deleting %s\n", rc,
obd_uuid2str(&tgt->ltd_uuid)); obd_uuid2str(&tgt->ltd_uuid));
lov_del_target(obd, index, 0, 0); lov_del_target(obd, index, NULL, 0);
} }
obd_putref(obd); obd_putref(obd);
return rc; return rc;
...@@ -768,7 +768,7 @@ void lov_fix_desc(struct lov_desc *desc) ...@@ -768,7 +768,7 @@ void lov_fix_desc(struct lov_desc *desc)
int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg) int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
{ {
struct lprocfs_static_vars lvars = { 0 }; struct lprocfs_static_vars lvars = { NULL };
struct lov_desc *desc; struct lov_desc *desc;
struct lov_obd *lov = &obd->u.lov; struct lov_obd *lov = &obd->u.lov;
int rc; int rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment