Commit 5bcfab13 authored by Alexandr Terekhov's avatar Alexandr Terekhov Committed by Greg Kroah-Hartman

staging: lustre: fix integer as NULL pointer warnings

Fix several sparse warnings "Using plain integer as NULL pointer"
Signed-off-by: default avatarAlexandr Terekhov <a.terekhov@gmail.com>

 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 4 ++--
 drivers/staging/lustre/lustre/obdclass/obd_mount.c | 4 ++--
 drivers/staging/lustre/lustre/obdecho/lproc_echo.c | 4 ++--
 drivers/staging/lustre/lustre/osc/osc_dev.c        | 2 +-
 drivers/staging/lustre/lustre/ptlrpc/import.c      | 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aec46bbd
...@@ -89,7 +89,7 @@ int ldlm_proc_setup(void) ...@@ -89,7 +89,7 @@ int ldlm_proc_setup(void)
{ {
int rc; int rc;
struct lprocfs_vars list[] = { struct lprocfs_vars list[] = {
{ "dump_namespaces", &ldlm_dump_ns_fops, 0, 0222 }, { "dump_namespaces", &ldlm_dump_ns_fops, NULL, 0222 },
{ "dump_granted_max", &ldlm_rw_uint_fops, { "dump_granted_max", &ldlm_rw_uint_fops,
&ldlm_dump_granted_max }, &ldlm_dump_granted_max },
{ "cancel_unused_locks_before_replay", &ldlm_rw_uint_fops, { "cancel_unused_locks_before_replay", &ldlm_rw_uint_fops,
...@@ -322,7 +322,7 @@ void ldlm_namespace_proc_unregister(struct ldlm_namespace *ns) ...@@ -322,7 +322,7 @@ void ldlm_namespace_proc_unregister(struct ldlm_namespace *ns)
snprintf(lock_name, MAX_STRING_SIZE, name); \ snprintf(lock_name, MAX_STRING_SIZE, name); \
lock_vars[0].data = var; \ lock_vars[0].data = var; \
lock_vars[0].fops = ops; \ lock_vars[0].fops = ops; \
lprocfs_add_vars(ns_pde, lock_vars, 0); \ lprocfs_add_vars(ns_pde, lock_vars, NULL); \
} while (0) } while (0)
int ldlm_namespace_proc_register(struct ldlm_namespace *ns) int ldlm_namespace_proc_register(struct ldlm_namespace *ns)
......
...@@ -383,7 +383,7 @@ int lustre_start_mgc(struct super_block *sb) ...@@ -383,7 +383,7 @@ int lustre_start_mgc(struct super_block *sb)
/* Start the MGC */ /* Start the MGC */
rc = lustre_start_simple(mgcname, LUSTRE_MGC_NAME, rc = lustre_start_simple(mgcname, LUSTRE_MGC_NAME,
(char *)uuid->uuid, LUSTRE_MGS_OBDNAME, (char *)uuid->uuid, LUSTRE_MGS_OBDNAME,
niduuid, 0, 0); niduuid, NULL, NULL);
OBD_FREE_PTR(uuid); OBD_FREE_PTR(uuid);
if (rc) if (rc)
GOTO(out_free, rc); GOTO(out_free, rc);
...@@ -482,7 +482,7 @@ static int lustre_stop_mgc(struct super_block *sb) ...@@ -482,7 +482,7 @@ static int lustre_stop_mgc(struct super_block *sb)
{ {
struct lustre_sb_info *lsi = s2lsi(sb); struct lustre_sb_info *lsi = s2lsi(sb);
struct obd_device *obd; struct obd_device *obd;
char *niduuid = 0, *ptr = 0; char *niduuid = NULL, *ptr = NULL;
int i, rc = 0, len = 0; int i, rc = 0, len = 0;
if (!lsi) if (!lsi)
......
...@@ -39,13 +39,13 @@ ...@@ -39,13 +39,13 @@
#ifdef LPROCFS #ifdef LPROCFS
LPROC_SEQ_FOPS_RO_TYPE(echo, uuid); LPROC_SEQ_FOPS_RO_TYPE(echo, uuid);
static struct lprocfs_vars lprocfs_echo_obd_vars[] = { static struct lprocfs_vars lprocfs_echo_obd_vars[] = {
{ "uuid", &echo_uuid_fops, 0, 0 }, { "uuid", &echo_uuid_fops, NULL, 0 },
{ 0 } { 0 }
}; };
LPROC_SEQ_FOPS_RO_TYPE(echo, numrefs); LPROC_SEQ_FOPS_RO_TYPE(echo, numrefs);
static struct lprocfs_vars lprocfs_echo_module_vars[] = { static struct lprocfs_vars lprocfs_echo_module_vars[] = {
{ "num_refs", &echo_numrefs_fops, 0, 0 }, { "num_refs", &echo_numrefs_fops, NULL, 0 },
{ 0 } { 0 }
}; };
......
...@@ -193,7 +193,7 @@ static int osc_device_init(const struct lu_env *env, struct lu_device *d, ...@@ -193,7 +193,7 @@ static int osc_device_init(const struct lu_env *env, struct lu_device *d,
static struct lu_device *osc_device_fini(const struct lu_env *env, static struct lu_device *osc_device_fini(const struct lu_env *env,
struct lu_device *d) struct lu_device *d)
{ {
return 0; return NULL;
} }
static struct lu_device *osc_device_free(const struct lu_env *env, static struct lu_device *osc_device_free(const struct lu_env *env,
......
...@@ -645,7 +645,7 @@ int ptlrpc_connect_import(struct obd_import *imp) ...@@ -645,7 +645,7 @@ int ptlrpc_connect_import(struct obd_import *imp)
if (rc) if (rc)
GOTO(out, rc); GOTO(out, rc);
rc = sptlrpc_import_sec_adapt(imp, NULL, 0); rc = sptlrpc_import_sec_adapt(imp, NULL, NULL);
if (rc) if (rc)
GOTO(out, rc); GOTO(out, 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