aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandr Terekhov <a.terekhov@gmail.com>2014-05-31 11:20:39 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-31 15:21:35 -0400
commit5bcfab136078d02e8ad990bffcb76d150be83dd9 (patch)
tree566091980655b2defdd2cdf9ac2f07f17adfd4a0
parentaec46bbdeab172a2129ef4e64051e706cbe9ec56 (diff)
staging: lustre: fix integer as NULL pointer warnings
Fix several sparse warnings "Using plain integer as NULL pointer" Signed-off-by: Alexandr 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/lustre/ldlm/ldlm_resource.c4
-rw-r--r--drivers/staging/lustre/lustre/obdclass/obd_mount.c4
-rw-r--r--drivers/staging/lustre/lustre/obdecho/lproc_echo.c4
-rw-r--r--drivers/staging/lustre/lustre/osc/osc_dev.c2
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/import.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
index a4cec5e63ce0..c55d72f79b26 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
@@ -89,7 +89,7 @@ int ldlm_proc_setup(void)
89{ 89{
90 int rc; 90 int rc;
91 struct lprocfs_vars list[] = { 91 struct lprocfs_vars list[] = {
92 { "dump_namespaces", &ldlm_dump_ns_fops, 0, 0222 }, 92 { "dump_namespaces", &ldlm_dump_ns_fops, NULL, 0222 },
93 { "dump_granted_max", &ldlm_rw_uint_fops, 93 { "dump_granted_max", &ldlm_rw_uint_fops,
94 &ldlm_dump_granted_max }, 94 &ldlm_dump_granted_max },
95 { "cancel_unused_locks_before_replay", &ldlm_rw_uint_fops, 95 { "cancel_unused_locks_before_replay", &ldlm_rw_uint_fops,
@@ -322,7 +322,7 @@ void ldlm_namespace_proc_unregister(struct ldlm_namespace *ns)
322 snprintf(lock_name, MAX_STRING_SIZE, name); \ 322 snprintf(lock_name, MAX_STRING_SIZE, name); \
323 lock_vars[0].data = var; \ 323 lock_vars[0].data = var; \
324 lock_vars[0].fops = ops; \ 324 lock_vars[0].fops = ops; \
325 lprocfs_add_vars(ns_pde, lock_vars, 0); \ 325 lprocfs_add_vars(ns_pde, lock_vars, NULL); \
326 } while (0) 326 } while (0)
327 327
328int ldlm_namespace_proc_register(struct ldlm_namespace *ns) 328int ldlm_namespace_proc_register(struct ldlm_namespace *ns)
diff --git a/drivers/staging/lustre/lustre/obdclass/obd_mount.c b/drivers/staging/lustre/lustre/obdclass/obd_mount.c
index 419a32361359..a034aee37fc1 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_mount.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_mount.c
@@ -383,7 +383,7 @@ int lustre_start_mgc(struct super_block *sb)
383 /* Start the MGC */ 383 /* Start the MGC */
384 rc = lustre_start_simple(mgcname, LUSTRE_MGC_NAME, 384 rc = lustre_start_simple(mgcname, LUSTRE_MGC_NAME,
385 (char *)uuid->uuid, LUSTRE_MGS_OBDNAME, 385 (char *)uuid->uuid, LUSTRE_MGS_OBDNAME,
386 niduuid, 0, 0); 386 niduuid, NULL, NULL);
387 OBD_FREE_PTR(uuid); 387 OBD_FREE_PTR(uuid);
388 if (rc) 388 if (rc)
389 GOTO(out_free, rc); 389 GOTO(out_free, rc);
@@ -482,7 +482,7 @@ static int lustre_stop_mgc(struct super_block *sb)
482{ 482{
483 struct lustre_sb_info *lsi = s2lsi(sb); 483 struct lustre_sb_info *lsi = s2lsi(sb);
484 struct obd_device *obd; 484 struct obd_device *obd;
485 char *niduuid = 0, *ptr = 0; 485 char *niduuid = NULL, *ptr = NULL;
486 int i, rc = 0, len = 0; 486 int i, rc = 0, len = 0;
487 487
488 if (!lsi) 488 if (!lsi)
diff --git a/drivers/staging/lustre/lustre/obdecho/lproc_echo.c b/drivers/staging/lustre/lustre/obdecho/lproc_echo.c
index b9abac1c4dca..8fe9245a8aad 100644
--- a/drivers/staging/lustre/lustre/obdecho/lproc_echo.c
+++ b/drivers/staging/lustre/lustre/obdecho/lproc_echo.c
@@ -39,13 +39,13 @@
39#ifdef LPROCFS 39#ifdef LPROCFS
40LPROC_SEQ_FOPS_RO_TYPE(echo, uuid); 40LPROC_SEQ_FOPS_RO_TYPE(echo, uuid);
41static struct lprocfs_vars lprocfs_echo_obd_vars[] = { 41static struct lprocfs_vars lprocfs_echo_obd_vars[] = {
42 { "uuid", &echo_uuid_fops, 0, 0 }, 42 { "uuid", &echo_uuid_fops, NULL, 0 },
43 { 0 } 43 { 0 }
44}; 44};
45 45
46LPROC_SEQ_FOPS_RO_TYPE(echo, numrefs); 46LPROC_SEQ_FOPS_RO_TYPE(echo, numrefs);
47static struct lprocfs_vars lprocfs_echo_module_vars[] = { 47static struct lprocfs_vars lprocfs_echo_module_vars[] = {
48 { "num_refs", &echo_numrefs_fops, 0, 0 }, 48 { "num_refs", &echo_numrefs_fops, NULL, 0 },
49 { 0 } 49 { 0 }
50}; 50};
51 51
diff --git a/drivers/staging/lustre/lustre/osc/osc_dev.c b/drivers/staging/lustre/lustre/osc/osc_dev.c
index 6a6483920c4d..a7c1ec0d56fe 100644
--- a/drivers/staging/lustre/lustre/osc/osc_dev.c
+++ b/drivers/staging/lustre/lustre/osc/osc_dev.c
@@ -193,7 +193,7 @@ static int osc_device_init(const struct lu_env *env, struct lu_device *d,
193static struct lu_device *osc_device_fini(const struct lu_env *env, 193static struct lu_device *osc_device_fini(const struct lu_env *env,
194 struct lu_device *d) 194 struct lu_device *d)
195{ 195{
196 return 0; 196 return NULL;
197} 197}
198 198
199static struct lu_device *osc_device_free(const struct lu_env *env, 199static struct lu_device *osc_device_free(const struct lu_env *env,
diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/staging/lustre/lustre/ptlrpc/import.c
index 1c73194421a6..8573f328bd2a 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/import.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/import.c
@@ -645,7 +645,7 @@ int ptlrpc_connect_import(struct obd_import *imp)
645 if (rc) 645 if (rc)
646 GOTO(out, rc); 646 GOTO(out, rc);
647 647
648 rc = sptlrpc_import_sec_adapt(imp, NULL, 0); 648 rc = sptlrpc_import_sec_adapt(imp, NULL, NULL);
649 if (rc) 649 if (rc)
650 GOTO(out, rc); 650 GOTO(out, rc);
651 651