Commit e6be8e63 authored by Marc Fite's avatar Marc Fite Committed by Greg Kroah-Hartman
Browse files

staging: lustre: lov: Fix sparse warning using plain integer as NULL pointer



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: default avatarMarc Fite <marc@fite.cat>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b9f28801
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -899,7 +899,7 @@ static int lov_cleanup(struct obd_device *obd)
				       " deathrow=%d, lovrc=%d\n",
				       " deathrow=%d, lovrc=%d\n",
				       i, lov->lov_death_row,
				       i, lov->lov_death_row,
				       atomic_read(&lov->lov_refcount));
				       atomic_read(&lov->lov_refcount));
			lov_del_target(obd, i, 0, 0);
			lov_del_target(obd, i, NULL, 0);
		}
		}
		obd_putref(obd);
		obd_putref(obd);
		OBD_FREE(lov->lov_tgts, sizeof(*lov->lov_tgts) *
		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);
		GOTO(out, rc);
	}
	}
	case LCFG_PARAM: {
	case LCFG_PARAM: {
		struct lprocfs_static_vars lvars = { 0 };
		struct lprocfs_static_vars lvars = { NULL };
		struct lov_desc *desc = &(obd->u.lov.desc);
		struct lov_desc *desc = &(obd->u.lov.desc);


		if (!desc)
		if (!desc)
@@ -2816,7 +2816,7 @@ struct kmem_cache *lov_oinfo_slab;


int __init lov_init(void)
int __init lov_init(void)
{
{
	struct lprocfs_static_vars lvars = { 0 };
	struct lprocfs_static_vars lvars = { NULL };
	int rc;
	int rc;


	/* print an address of _any_ initialized kernel symbol from this
	/* print an address of _any_ initialized kernel symbol from this