staging: lustre: lov: Fix sparse warning using plain integer as NULL pointer
authorMarc Fite <marc@fite.cat>
Sun, 27 Jul 2014 18:31:08 +0000 (20:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Jul 2014 18:43:01 +0000 (11:43 -0700)
This patch fixes the warning generated by sparse: "Using plain integer as NULL pointer" by replacing the offending 0s with NULL.

drivers/staging/lustre/lustre/lov/lov_obd.c:902:48: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:946:54: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:2819:46: warning: Using plain integer as NULL pointer

Signed-off-by: Marc Fite <marc@fite.cat>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/lov/lov_obd.c

index 814dd49f332deb359a60b7d5c8c7807e392875cb..e4f4fe3f71c78c5dfe3695d47f5b15162ba53e37 100644 (file)
@@ -899,7 +899,7 @@ static int lov_cleanup(struct obd_device *obd)
                                       " deathrow=%d, lovrc=%d\n",
                                       i, lov->lov_death_row,
                                       atomic_read(&lov->lov_refcount));
-                       lov_del_target(obd, i, 0, 0);
+                       lov_del_target(obd, i, NULL, 0);
                }
                obd_putref(obd);
                OBD_FREE(lov->lov_tgts, sizeof(*lov->lov_tgts) *
@@ -943,7 +943,7 @@ int lov_process_config_base(struct obd_device *obd, struct lustre_cfg *lcfg,
                GOTO(out, rc);
        }
        case LCFG_PARAM: {
-               struct lprocfs_static_vars lvars = { 0 };
+               struct lprocfs_static_vars lvars = { NULL };
                struct lov_desc *desc = &(obd->u.lov.desc);
 
                if (!desc)
@@ -2816,7 +2816,7 @@ struct kmem_cache *lov_oinfo_slab;
 
 int __init lov_init(void)
 {
-       struct lprocfs_static_vars lvars = { 0 };
+       struct lprocfs_static_vars lvars = { NULL };
        int rc;
 
        /* print an address of _any_ initialized kernel symbol from this