staging: lustre: use NULL instead of 0 for non-integers
PATCH 1/1 staging: lustre: use NULL instead of 0 for non-integers
This fixes sparse errors where 0 is used for non-integers.
Signed-off-by Martin Kepplinger <[email protected]>
---
applies to -next20140802
drivers/staging/lustre/lnet/lnet/api-ni.c | 4 +- drivers/staging/lustre/lustre/fld/fld_request.c | 2 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- drivers/staging/lustre/lustre/llite/lproc_llite.c | 2 +- drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 44 ++++++++++---------- drivers/staging/lustre/lustre/mgc/mgc_request.c | 2 +- .../lustre/lustre/obdclass/linux/linux-module.c | 2 +- drivers/staging/lustre/lustre/obdclass/llog_test.c | 4 +- .../staging/lustre/lustre/obdclass/obd_config.c | 4 +- .../staging/lustre/lustre/obdecho/echo_client.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 6 +-- 11 files changed, 37 insertions(+), 37 deletions(-)
drivers/staging/lustre/lnet/lnet/api-ni.c +2 -2
@@ -1662,7 +1662,7 @@ lnet_destroy_ping_info(void)int lnet_ping_target_init (void ) { -lnet_md_t md = {0 }; +lnet_md_t md = {NULL };lnet_handle_me_t meh;lnet_process_id_t id;int rc;
@@ -1770,7 +1770,7 @@ lnet_ping (lnet_process_id_t id, int timeout_ms, lnet_process_id_t *ids, int n_ilnet_handle_eq_t eqh;lnet_handle_md_t mdh;lnet_event_t event; -lnet_md_t md = {0 }; +lnet_md_t md = {NULL };int which;int unlinked =0 ;int replied =0 ;
drivers/staging/lustre/lustre/fld/fld_request.c +1 -1
@@ -168,7 +168,7 @@ struct lu_fld_hash fld_hash[] = { .fh_scan_func = fld_rrb_scan }, { - 0, + NULL, } };
drivers/staging/lustre/lustre/llite/llite_lib.c +1 -1
@@ -152,7 +152,7 @@ static void ll_free_sbi(struct super_block *sb)static int client_common_fill_super (struct super_block *sb,char *md,char *dt,struct vfsmount *mnt) { -struct inode *root =0 ; +struct inode *root =NULL ;struct ll_sb_info *sbi =ll_s2sbi (sb);struct obd_device *obd;struct obd_capa *oc =NULL ;
drivers/staging/lustre/lustre/llite/lproc_llite.c +1 -1
@@ -843,7 +843,7 @@ static struct lprocfs_vars lprocfs_llite_obd_vars[] = { { "default_cookiesize", &ll_defult_cookiesize_fops, NULL, 0 }, { "sbi_flags", &ll_sbi_flags_fops, NULL, 0 }, { "xattr_cache", &ll_xattr_cache_fops, NULL, 0 }, - { 0 } + { NULL } };#define MAX_STRING_SIZE 128
drivers/staging/lustre/lustre/mdc/lproc_mdc.c +22 -22
61 lines not on this page · raw message
drivers/staging/lustre/lustre/mgc/mgc_request.c +1 -1
@@ -197,7 +197,7 @@ struct config_llog_data *do_config_log_add(struct obd_device *obd,int rc;CDEBUG (D_MGC ,"do adding config log %s:%p\n" , logname, - cfg ? cfg->cfg_instance :0 ); + cfg ? cfg->cfg_instance :NULL );OBD_ALLOC (cld,sizeof (*cld) +strlen (logname) +1 );if (!cld)
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +1 -1
@@ -328,7 +328,7 @@ struct lprocfs_vars lprocfs_base[] = { { "jobid_var", &obd_proc_jobid_var_fops }, { .name = "jobid_name", .fops = &obd_proc_jobid_name_fops}, - { 0 } + { NULL } };static void *obd_device_list_seq_start (struct seq_file *p,loff_t *pos)
drivers/staging/lustre/lustre/obdclass/llog_test.c +2 -2
@@ -940,8 +940,8 @@ cleanup_ctxt: }#if defined (CONFIG_PROC_FS ) -static struct lprocfs_vars lprocfs_llog_test_obd_vars[] = { {0 } }; -static struct lprocfs_vars lprocfs_llog_test_module_vars[] = { {0 } }; +static struct lprocfs_vars lprocfs_llog_test_obd_vars[] = { {NULL } }; +static struct lprocfs_vars lprocfs_llog_test_module_vars[] = { {NULL } };static void lprocfs_llog_test_init_vars (struct lprocfs_static_vars *lvars) { lvars->module_vars = lprocfs_llog_test_module_vars;
drivers/staging/lustre/lustre/obdclass/obd_config.c +2 -2
@@ -1161,7 +1161,7 @@ int class_process_config(struct lustre_cfg *lcfg)char *tmp;/* llite has no obd */ if ((class_match_param (lustre_cfg_string (lcfg,1 ), -PARAM_LLITE ,0 ) ==0 ) && +PARAM_LLITE ,NULL ) ==0 ) && client_process_config) { err = (*client_process_config)(lcfg);GOTO (out, err);
@@ -1303,7 +1303,7 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars,/* Search proc entries */ while (lvars[j].name) { var = &lvars[j]; -if (class_match_param (key, (char *)var->name,0 ) ==0 && +if (class_match_param (key, (char *)var->name,NULL ) ==0 && keylen ==strlen (var->name)) { matched++; rc = -EROFS ;
drivers/staging/lustre/lustre/obdecho/echo_client.c +1 -1
@@ -3113,7 +3113,7 @@ static struct obd_ops echo_client_obd_ops = {int echo_client_init (void ) { -struct lprocfs_static_vars lvars = {0 }; +struct lprocfs_static_vars lvars = {NULL };int rc;lprocfs_echo_init_vars (&lvars);
drivers/staging/lustre/lustre/osc/osc_request.c +3 -3
@@ -3421,7 +3421,7 @@ static int brw_queue_work(const struct lu_env *env, void *data)int osc_setup (struct obd_device *obd,struct lustre_cfg *lcfg) { -struct lprocfs_static_vars lvars = {0 }; +struct lprocfs_static_vars lvars = {NULL };struct client_obd *cli = &obd->u.cli;void *handler;int rc;
@@ -3545,7 +3545,7 @@ int osc_cleanup(struct obd_device *obd)int osc_process_config_base (struct obd_device *obd,struct lustre_cfg *lcfg) { -struct lprocfs_static_vars lvars = {0 }; +struct lprocfs_static_vars lvars = {NULL };int rc =0 ;lprocfs_osc_init_vars (&lvars);
@@ -3612,7 +3612,7 @@ extern struct lock_class_key osc_ast_guard_class;int __init osc_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
Signature · 1 line
1.7.10.4
Greg KH
maintainerQuoted 5 lines · Martin Kepplinger
This fixes sparse errors where 0 is used for non-integers.
Signed-off-by Martin Kepplinger <[email protected]>---
applies to -next20140802
Someone else already did this same change, sorry :(
greg k-h