diff for duplicates of <5543C660.8000303@bfs.de> diff --git a/a/1.txt b/N1/1.txt index 2ea0d8f..89b988b 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -55,7 +55,7 @@ Am 01.05.2015 17:51, schrieb Julia Lawall: > > - OBD_ALLOC_PTR(bufs); > + bufs = kzalloc(sizeof(*bufs), GFP_NOFS); -> if (bufs = NULL) +> if (bufs == NULL) > return -ENOMEM; > > @@ -97,7 +97,7 @@ int lustre_process_log(struct super_bloc @@ -65,7 +65,7 @@ Am 01.05.2015 17:51, schrieb Julia Lawall: > - OBD_FREE_PTR(bufs); > + kfree(bufs); > -> if (rc = -EINVAL) +> if (rc == -EINVAL) > LCONSOLE_ERROR_MSG(0x15b, "%s: The configuration from log '%s' failed from the MGS (%d). Make sure this client and the MGS are running compatible versions of Lustre.\n", > @@ -247,8 +247,8 @@ int lustre_start_mgc(struct super_block > mutex_lock(&mgc_start_lock); @@ -91,7 +91,7 @@ Am 01.05.2015 17:51, schrieb Julia Lawall: > > - OBD_ALLOC_PTR(data); > + data = kzalloc(sizeof(*data), GFP_NOFS); -> if (data = NULL) { +> if (data == NULL) { > rc = -ENOMEM; > goto out_free; > @@ -375,7 +375,7 @@ int lustre_start_mgc(struct super_block @@ -205,7 +205,7 @@ Am 01.05.2015 17:51, schrieb Julia Lawall: > + kfree(lsi->lsi_lmd); > } > -> LASSERT(lsi->lsi_llsbi = NULL); +> LASSERT(lsi->lsi_llsbi == NULL); > - OBD_FREE(lsi, sizeof(*lsi)); > + kfree(lsi); > s2lsi_nocast(sb) = NULL; @@ -260,7 +260,7 @@ seems to do the same job. > > - OBD_ALLOC(lmd->lmd_mgssec, length + 1); > + lmd->lmd_mgssec = kzalloc(length + 1, GFP_NOFS); -> if (lmd->lmd_mgssec = NULL) +> if (lmd->lmd_mgssec == NULL) > return -ENOMEM; > @@ -284,7 +284,7 @@ seems to do the same job. > > - OBD_ALLOC(*handle, length + 1); > + *handle = kzalloc(length + 1, GFP_NOFS); -> if (*handle = NULL) +> if (*handle == NULL) > return -ENOMEM; > @@ -299,7 +299,7 @@ perhaps this can be merged. > > - OBD_ALLOC(mgsnid, oldlen + length + 1); > + mgsnid = kzalloc(oldlen + length + 1, GFP_NOFS); -> if (mgsnid = NULL) +> if (mgsnid == NULL) > return -ENOMEM; > > @@ -971,7 +963,7 @@ static int lmd_parse_mgs(struct lustre_m @@ -321,12 +321,12 @@ the code lmd_parse_mgs basicly does: > > - OBD_ALLOC(lmd->lmd_params, 4096); > + lmd->lmd_params = kzalloc(4096, GFP_NOFS); -> if (lmd->lmd_params = NULL) +> if (lmd->lmd_params == NULL) > return -ENOMEM; > lmd->lmd_params[0] = '\0'; > @@ -1143,14 +1135,14 @@ static int lmd_parse(char *options, stru > /* Remove leading /s from fsname */ -> while (*++s1 = '/') ; +> while (*++s1 == '/') ; > /* Freed in lustre_free_lsi */ > - OBD_ALLOC(lmd->lmd_profile, strlen(s1) + 8); > + lmd->lmd_profile = kzalloc(strlen(s1) + 8, GFP_NOFS); @@ -359,32 +359,32 @@ the code lmd_parse_mgs basicly does: > > - OBD_ALLOC(lprof, sizeof(*lprof)); > + lprof = kzalloc(sizeof(*lprof), GFP_NOFS); -> if (lprof = NULL) +> if (lprof == NULL) > return -ENOMEM; > INIT_LIST_HEAD(&lprof->lp_list); > -> LASSERT(proflen = (strlen(prof) + 1)); +> LASSERT(proflen == (strlen(prof) + 1)); > - OBD_ALLOC(lprof->lp_profile, proflen); > + lprof->lp_profile = kzalloc(proflen, GFP_NOFS); -> if (lprof->lp_profile = NULL) { +> if (lprof->lp_profile == NULL) { > err = -ENOMEM; > goto out; > @@ -874,7 +874,7 @@ int class_add_profile(int proflen, char > memcpy(lprof->lp_profile, prof, proflen); > -> LASSERT(osclen = (strlen(osc) + 1)); +> LASSERT(osclen == (strlen(osc) + 1)); > - OBD_ALLOC(lprof->lp_dt, osclen); > + lprof->lp_dt = kzalloc(osclen, GFP_NOFS); -> if (lprof->lp_dt = NULL) { +> if (lprof->lp_dt == NULL) { > err = -ENOMEM; > goto out; > @@ -883,7 +883,7 @@ int class_add_profile(int proflen, char > > if (mdclen > 0) { -> LASSERT(mdclen = (strlen(mdc) + 1)); +> LASSERT(mdclen == (strlen(mdc) + 1)); > - OBD_ALLOC(lprof->lp_md, mdclen); > + lprof->lp_md = kzalloc(mdclen, GFP_NOFS); -> if (lprof->lp_md = NULL) { +> if (lprof->lp_md == NULL) { > err = -ENOMEM; > goto out; > @@ -896,12 +896,12 @@ int class_add_profile(int proflen, char @@ -442,7 +442,7 @@ the code lmd_parse_mgs basicly does: > > - OBD_ALLOC(new_param, new_len); > + new_param = kzalloc(new_len, GFP_NOFS); -> if (new_param = NULL) +> if (new_param == NULL) > return ERR_PTR(-ENOMEM); > > @@ -1019,9 +1019,9 @@ struct lustre_cfg *lustre_cfg_rename(str @@ -451,7 +451,7 @@ the code lmd_parse_mgs basicly does: > > - OBD_ALLOC_PTR(bufs); > + bufs = kzalloc(sizeof(*bufs), GFP_NOFS); -> if (bufs = NULL) { +> if (bufs == NULL) { > - OBD_FREE(new_param, new_len); > + kfree(new_param); > return ERR_PTR(-ENOMEM); @@ -465,7 +465,7 @@ the code lmd_parse_mgs basicly does: > - OBD_FREE_PTR(bufs); > + kfree(new_param); > + kfree(bufs); -> if (new_cfg = NULL) +> if (new_cfg == NULL) > return ERR_PTR(-ENOMEM); > > @@ -1493,7 +1493,7 @@ int class_config_llog_handler(const stru @@ -474,7 +474,7 @@ the code lmd_parse_mgs basicly does: > sizeof(clli->cfg_instance) * 2 + 4; > - OBD_ALLOC(inst_name, inst_len); > + inst_name = kzalloc(inst_len, GFP_NOFS); -> if (inst_name = NULL) { +> if (inst_name == NULL) { > rc = -ENOMEM; > goto out; > @@ -1556,7 +1556,7 @@ int class_config_llog_handler(const stru @@ -492,7 +492,7 @@ the code lmd_parse_mgs basicly does: > > - OBD_ALLOC(outstr, 256); > + outstr = kzalloc(256, GFP_NOFS); -> if (outstr = NULL) +> if (outstr == NULL) > return -ENOMEM; > > @@ -1683,7 +1683,7 @@ int class_config_dump_handler(const stru @@ -513,7 +513,7 @@ the code lmd_parse_mgs basicly does: > > - OBD_ALLOC_PTR(data); > + data = kzalloc(sizeof(*data), GFP_NOFS); -> if (data = NULL) +> if (data == NULL) > return -ENOMEM; > > @@ -136,7 +136,7 @@ int class_add_uuid(const char *uuid, __u @@ -573,12 +573,12 @@ the code lmd_parse_mgs basicly does: > --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c > +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c > @@ -276,7 +276,7 @@ struct proc_dir_entry *lprocfs_add_symli -> if (parent = NULL || format = NULL) +> if (parent == NULL || format == NULL) > return NULL; > > - OBD_ALLOC_WAIT(dest, MAX_STRING_SIZE + 1); > + dest = kzalloc(MAX_STRING_SIZE + 1, GFP_KERNEL); -> if (dest = NULL) +> if (dest == NULL) > return NULL; > > @@ -289,7 +289,7 @@ struct proc_dir_entry *lprocfs_add_symli @@ -605,7 +605,7 @@ the code lmd_parse_mgs basicly does: > > - OBD_ALLOC_PTR(new_stat); > + new_stat = kzalloc(sizeof(*new_stat), GFP_NOFS); -> if (new_stat = NULL) +> if (new_stat == NULL) > return -ENOMEM; > > @@ -1711,7 +1711,7 @@ int lprocfs_exp_setup(struct obd_export @@ -614,7 +614,7 @@ the code lmd_parse_mgs basicly does: > /* not found - create */ > - OBD_ALLOC(buffer, LNET_NIDSTR_SIZE); > + buffer = kzalloc(LNET_NIDSTR_SIZE, GFP_NOFS); -> if (buffer = NULL) { +> if (buffer == NULL) { > rc = -ENOMEM; > goto destroy_new; > @@ -1721,7 +1721,7 @@ int lprocfs_exp_setup(struct obd_export @@ -665,13 +665,13 @@ the code lmd_parse_mgs basicly does: > > - OBD_ALLOC_PTR(loghandle); > + loghandle = kzalloc(sizeof(*loghandle), GFP_NOFS); -> if (loghandle = NULL) +> if (loghandle == NULL) > return NULL; > > @@ -88,9 +88,9 @@ static void llog_free_handle(struct llog > else if (loghandle->lgh_hdr->llh_flags & LLOG_F_IS_CAT) > LASSERT(list_empty(&loghandle->u.chd.chd_head)); -> LASSERT(sizeof(*(loghandle->lgh_hdr)) = LLOG_CHUNK_SIZE); +> LASSERT(sizeof(*(loghandle->lgh_hdr)) == LLOG_CHUNK_SIZE); > - OBD_FREE(loghandle->lgh_hdr, LLOG_CHUNK_SIZE); > + kfree(loghandle->lgh_hdr); > out: @@ -682,11 +682,11 @@ the code lmd_parse_mgs basicly does: > void llog_handle_get(struct llog_handle *loghandle) > @@ -207,7 +207,7 @@ int llog_init_handle(const struct lu_env > -> LASSERT(handle->lgh_hdr = NULL); +> LASSERT(handle->lgh_hdr == NULL); > > - OBD_ALLOC_PTR(llh); > + llh = kzalloc(sizeof(*llh), GFP_NOFS); -> if (llh = NULL) +> if (llh == NULL) > return -ENOMEM; > handle->lgh_hdr = llh; > @@ -261,7 +261,7 @@ int llog_init_handle(const struct lu_env @@ -722,7 +722,7 @@ the code lmd_parse_mgs basicly does: > > - OBD_ALLOC_PTR(lpi); > + lpi = kzalloc(sizeof(*lpi), GFP_NOFS); -> if (lpi = NULL) { +> if (lpi == NULL) { > CERROR("cannot alloc pointer\n"); > return -ENOMEM; > @@ -454,7 +454,7 @@ int llog_process_or_fork(const struct lu @@ -770,7 +770,7 @@ the code lmd_parse_mgs basicly does: > rc = -ENOMEM; > - OBD_ALLOC(type, sizeof(*type)); > + type = kzalloc(sizeof(*type), GFP_NOFS); -> if (type = NULL) +> if (type == NULL) > return rc; > > - OBD_ALLOC_PTR(type->typ_dt_ops); @@ -780,8 +780,8 @@ the code lmd_parse_mgs basicly does: > + type->typ_md_ops = kzalloc(sizeof(*type->typ_md_ops), GFP_NOFS); > + type->typ_name = kzalloc(strlen(name) + 1, GFP_NOFS); > -> if (type->typ_dt_ops = NULL || -> type->typ_md_ops = NULL || +> if (type->typ_dt_ops == NULL || +> type->typ_md_ops == NULL || > @@ -214,12 +214,12 @@ int class_register_type(struct obd_ops * > > failed: @@ -853,14 +853,14 @@ the code lmd_parse_mgs basicly does: > + kfree(imp_conn); > } > -> LASSERT(imp->imp_sec = NULL); +> LASSERT(imp->imp_sec == NULL); > @@ -1008,7 +1008,7 @@ struct obd_import *class_new_import(stru > { > struct obd_import *imp; > > - OBD_ALLOC(imp, sizeof(*imp)); > + imp = kzalloc(sizeof(*imp), GFP_NOFS); -> if (imp = NULL) +> if (imp == NULL) > return NULL; > > @@ -1811,7 +1811,7 @@ void *kuc_alloc(int payload_len, int tra @@ -869,7 +869,7 @@ the code lmd_parse_mgs basicly does: > > - OBD_ALLOC(lh, len); > + lh = kzalloc(len, GFP_NOFS); -> if (lh = NULL) +> if (lh == NULL) > return ERR_PTR(-ENOMEM); > > @@ -1828,6 +1828,6 @@ EXPORT_SYMBOL(kuc_alloc); @@ -889,7 +889,7 @@ the code lmd_parse_mgs basicly does: > } > - OBD_ALLOC(lcfg, data->ioc_plen1); > + lcfg = kzalloc(data->ioc_plen1, GFP_NOFS); -> if (lcfg = NULL) { +> if (lcfg == NULL) { > err = -ENOMEM; > goto out; > @@ -243,7 +243,7 @@ int class_handle_ioctl(unsigned int cmd, @@ -995,7 +995,7 @@ the code lmd_parse_mgs basicly does: > > - OBD_ALLOC(new, new_size); > + new = kzalloc(new_size, GFP_NOFS); -> if (unlikely(new = NULL)) +> if (unlikely(new == NULL)) > return -ENOMEM; > > memcpy(new, *header, new_size); @@ -1010,7 +1010,7 @@ the code lmd_parse_mgs basicly does: > > - OBD_ALLOC(new, ext_size); > + new = kzalloc(ext_size, GFP_NOFS); -> if (unlikely(new = NULL)) +> if (unlikely(new == NULL)) > return -ENOMEM; > > memcpy(new, *header, ext_size); @@ -1025,7 +1025,7 @@ the code lmd_parse_mgs basicly does: > esize = CFS_ACL_XATTR_SIZE(count, ext_acl_xattr); > - OBD_ALLOC(new, esize); > + new = kzalloc(esize, GFP_NOFS); -> if (unlikely(new = NULL)) +> if (unlikely(new == NULL)) > return ERR_PTR(-ENOMEM); > > @@ -183,7 +183,7 @@ int lustre_posix_acl_xattr_filter(posix_ @@ -1034,7 +1034,7 @@ the code lmd_parse_mgs basicly does: > > - OBD_ALLOC(new, size); > + new = kzalloc(size, GFP_NOFS); -> if (unlikely(new = NULL)) +> if (unlikely(new == NULL)) > return -ENOMEM; > > @@ -232,7 +232,7 @@ int lustre_posix_acl_xattr_filter(posix_ @@ -1071,15 +1071,16 @@ the code lmd_parse_mgs basicly does: > posix_size = CFS_ACL_XATTR_SIZE(posix_count, posix_acl_xattr); > - OBD_ALLOC(new, posix_size); > + new = kzalloc(posix_size, GFP_NOFS); -> if (unlikely(new = NULL)) +> if (unlikely(new == NULL)) > return -ENOMEM; > > @@ -360,7 +359,7 @@ int lustre_acl_xattr_merge2posix(posix_a > posix_count = ori_posix_count + ext_count; -> posix_size > CFS_ACL_XATTR_SIZE(posix_count, posix_acl_xattr); +> posix_size = +> CFS_ACL_XATTR_SIZE(posix_count, posix_acl_xattr); > - OBD_ALLOC(new, posix_size); > + new = kzalloc(posix_size, GFP_NOFS); -> if (unlikely(new = NULL)) +> if (unlikely(new == NULL)) > return -ENOMEM; > > @@ -402,7 +401,7 @@ int lustre_acl_xattr_merge2posix(posix_a @@ -1097,7 +1098,7 @@ the code lmd_parse_mgs basicly does: > > - OBD_ALLOC(new, ext_size); > + new = kzalloc(ext_size, GFP_NOFS); -> if (unlikely(new = NULL)) +> if (unlikely(new == NULL)) > return ERR_PTR(-ENOMEM); > > @@ -538,7 +537,7 @@ lustre_acl_xattr_merge2ext(posix_acl_xat diff --git a/a/content_digest b/N1/content_digest index 1d31c47..3ccf19d 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -2,7 +2,7 @@ "ref\01430495482-933-5-git-send-email-Julia.Lawall@lip6.fr\0" "From\0walter harms <wharms@bfs.de>\0" "Subject\0Re: [PATCH 8/11] staging: lustre: obdclass: Use kzalloc and kfree\0" - "Date\0Fri, 01 May 2015 18:30:56 +0000\0" + "Date\0Fri, 01 May 2015 20:30:56 +0200\0" "To\0Julia Lawall <Julia.Lawall@lip6.fr>\0" "Cc\0kernel-janitors@vger.kernel.org" HPDD-discuss@ml01.01.org @@ -67,7 +67,7 @@ "> \n" "> -\tOBD_ALLOC_PTR(bufs);\n" "> +\tbufs = kzalloc(sizeof(*bufs), GFP_NOFS);\n" - "> \tif (bufs = NULL)\n" + "> \tif (bufs == NULL)\n" "> \t\treturn -ENOMEM;\n" "> \n" "> @@ -97,7 +97,7 @@ int lustre_process_log(struct super_bloc\n" @@ -77,7 +77,7 @@ "> -\tOBD_FREE_PTR(bufs);\n" "> +\tkfree(bufs);\n" "> \n" - "> \tif (rc = -EINVAL)\n" + "> \tif (rc == -EINVAL)\n" "> \t\tLCONSOLE_ERROR_MSG(0x15b, \"%s: The configuration from log '%s' failed from the MGS (%d). Make sure this client and the MGS are running compatible versions of Lustre.\\n\",\n" "> @@ -247,8 +247,8 @@ int lustre_start_mgc(struct super_block\n" "> \tmutex_lock(&mgc_start_lock);\n" @@ -103,7 +103,7 @@ "> \n" "> -\tOBD_ALLOC_PTR(data);\n" "> +\tdata = kzalloc(sizeof(*data), GFP_NOFS);\n" - "> \tif (data = NULL) {\n" + "> \tif (data == NULL) {\n" "> \t\trc = -ENOMEM;\n" "> \t\tgoto out_free;\n" "> @@ -375,7 +375,7 @@ int lustre_start_mgc(struct super_block\n" @@ -217,7 +217,7 @@ "> +\t\tkfree(lsi->lsi_lmd);\n" "> \t}\n" "> \n" - "> \tLASSERT(lsi->lsi_llsbi = NULL);\n" + "> \tLASSERT(lsi->lsi_llsbi == NULL);\n" "> -\tOBD_FREE(lsi, sizeof(*lsi));\n" "> +\tkfree(lsi);\n" "> \ts2lsi_nocast(sb) = NULL;\n" @@ -272,7 +272,7 @@ "> \n" "> -\tOBD_ALLOC(lmd->lmd_mgssec, length + 1);\n" "> +\tlmd->lmd_mgssec = kzalloc(length + 1, GFP_NOFS);\n" - "> \tif (lmd->lmd_mgssec = NULL)\n" + "> \tif (lmd->lmd_mgssec == NULL)\n" "> \t\treturn -ENOMEM;\n" "> \n" "\n" @@ -296,7 +296,7 @@ "> \n" "> -\tOBD_ALLOC(*handle, length + 1);\n" "> +\t*handle = kzalloc(length + 1, GFP_NOFS);\n" - "> \tif (*handle = NULL)\n" + "> \tif (*handle == NULL)\n" "> \t\treturn -ENOMEM;\n" "> \n" "\n" @@ -311,7 +311,7 @@ "> \n" "> -\tOBD_ALLOC(mgsnid, oldlen + length + 1);\n" "> +\tmgsnid = kzalloc(oldlen + length + 1, GFP_NOFS);\n" - "> \tif (mgsnid = NULL)\n" + "> \tif (mgsnid == NULL)\n" "> \t\treturn -ENOMEM;\n" "> \n" "> @@ -971,7 +963,7 @@ static int lmd_parse_mgs(struct lustre_m\n" @@ -333,12 +333,12 @@ "> \n" "> -\tOBD_ALLOC(lmd->lmd_params, 4096);\n" "> +\tlmd->lmd_params = kzalloc(4096, GFP_NOFS);\n" - "> \tif (lmd->lmd_params = NULL)\n" + "> \tif (lmd->lmd_params == NULL)\n" "> \t\treturn -ENOMEM;\n" "> \tlmd->lmd_params[0] = '\\0';\n" "> @@ -1143,14 +1135,14 @@ static int lmd_parse(char *options, stru\n" "> \t\t/* Remove leading /s from fsname */\n" - "> \t\twhile (*++s1 = '/') ;\n" + "> \t\twhile (*++s1 == '/') ;\n" "> \t\t/* Freed in lustre_free_lsi */\n" "> -\t\tOBD_ALLOC(lmd->lmd_profile, strlen(s1) + 8);\n" "> +\t\tlmd->lmd_profile = kzalloc(strlen(s1) + 8, GFP_NOFS);\n" @@ -371,32 +371,32 @@ "> \n" "> -\tOBD_ALLOC(lprof, sizeof(*lprof));\n" "> +\tlprof = kzalloc(sizeof(*lprof), GFP_NOFS);\n" - "> \tif (lprof = NULL)\n" + "> \tif (lprof == NULL)\n" "> \t\treturn -ENOMEM;\n" "> \tINIT_LIST_HEAD(&lprof->lp_list);\n" "> \n" - "> \tLASSERT(proflen = (strlen(prof) + 1));\n" + "> \tLASSERT(proflen == (strlen(prof) + 1));\n" "> -\tOBD_ALLOC(lprof->lp_profile, proflen);\n" "> +\tlprof->lp_profile = kzalloc(proflen, GFP_NOFS);\n" - "> \tif (lprof->lp_profile = NULL) {\n" + "> \tif (lprof->lp_profile == NULL) {\n" "> \t\terr = -ENOMEM;\n" "> \t\tgoto out;\n" "> @@ -874,7 +874,7 @@ int class_add_profile(int proflen, char\n" "> \tmemcpy(lprof->lp_profile, prof, proflen);\n" "> \n" - "> \tLASSERT(osclen = (strlen(osc) + 1));\n" + "> \tLASSERT(osclen == (strlen(osc) + 1));\n" "> -\tOBD_ALLOC(lprof->lp_dt, osclen);\n" "> +\tlprof->lp_dt = kzalloc(osclen, GFP_NOFS);\n" - "> \tif (lprof->lp_dt = NULL) {\n" + "> \tif (lprof->lp_dt == NULL) {\n" "> \t\terr = -ENOMEM;\n" "> \t\tgoto out;\n" "> @@ -883,7 +883,7 @@ int class_add_profile(int proflen, char\n" "> \n" "> \tif (mdclen > 0) {\n" - "> \t\tLASSERT(mdclen = (strlen(mdc) + 1));\n" + "> \t\tLASSERT(mdclen == (strlen(mdc) + 1));\n" "> -\t\tOBD_ALLOC(lprof->lp_md, mdclen);\n" "> +\t\tlprof->lp_md = kzalloc(mdclen, GFP_NOFS);\n" - "> \t\tif (lprof->lp_md = NULL) {\n" + "> \t\tif (lprof->lp_md == NULL) {\n" "> \t\t\terr = -ENOMEM;\n" "> \t\t\tgoto out;\n" "> @@ -896,12 +896,12 @@ int class_add_profile(int proflen, char\n" @@ -454,7 +454,7 @@ "> \n" "> -\tOBD_ALLOC(new_param, new_len);\n" "> +\tnew_param = kzalloc(new_len, GFP_NOFS);\n" - "> \tif (new_param = NULL)\n" + "> \tif (new_param == NULL)\n" "> \t\treturn ERR_PTR(-ENOMEM);\n" "> \n" "> @@ -1019,9 +1019,9 @@ struct lustre_cfg *lustre_cfg_rename(str\n" @@ -463,7 +463,7 @@ "> \n" "> -\tOBD_ALLOC_PTR(bufs);\n" "> +\tbufs = kzalloc(sizeof(*bufs), GFP_NOFS);\n" - "> \tif (bufs = NULL) {\n" + "> \tif (bufs == NULL) {\n" "> -\t\tOBD_FREE(new_param, new_len);\n" "> +\t\tkfree(new_param);\n" "> \t\treturn ERR_PTR(-ENOMEM);\n" @@ -477,7 +477,7 @@ "> -\tOBD_FREE_PTR(bufs);\n" "> +\tkfree(new_param);\n" "> +\tkfree(bufs);\n" - "> \tif (new_cfg = NULL)\n" + "> \tif (new_cfg == NULL)\n" "> \t\treturn ERR_PTR(-ENOMEM);\n" "> \n" "> @@ -1493,7 +1493,7 @@ int class_config_llog_handler(const stru\n" @@ -486,7 +486,7 @@ "> \t\t\t\t sizeof(clli->cfg_instance) * 2 + 4;\n" "> -\t\t\tOBD_ALLOC(inst_name, inst_len);\n" "> +\t\t\tinst_name = kzalloc(inst_len, GFP_NOFS);\n" - "> \t\t\tif (inst_name = NULL) {\n" + "> \t\t\tif (inst_name == NULL) {\n" "> \t\t\t\trc = -ENOMEM;\n" "> \t\t\t\tgoto out;\n" "> @@ -1556,7 +1556,7 @@ int class_config_llog_handler(const stru\n" @@ -504,7 +504,7 @@ "> \n" "> -\tOBD_ALLOC(outstr, 256);\n" "> +\toutstr = kzalloc(256, GFP_NOFS);\n" - "> \tif (outstr = NULL)\n" + "> \tif (outstr == NULL)\n" "> \t\treturn -ENOMEM;\n" "> \n" "> @@ -1683,7 +1683,7 @@ int class_config_dump_handler(const stru\n" @@ -525,7 +525,7 @@ "> \n" "> -\tOBD_ALLOC_PTR(data);\n" "> +\tdata = kzalloc(sizeof(*data), GFP_NOFS);\n" - "> \tif (data = NULL)\n" + "> \tif (data == NULL)\n" "> \t\treturn -ENOMEM;\n" "> \n" "> @@ -136,7 +136,7 @@ int class_add_uuid(const char *uuid, __u\n" @@ -585,12 +585,12 @@ "> --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c\n" "> +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c\n" "> @@ -276,7 +276,7 @@ struct proc_dir_entry *lprocfs_add_symli\n" - "> \tif (parent = NULL || format = NULL)\n" + "> \tif (parent == NULL || format == NULL)\n" "> \t\treturn NULL;\n" "> \n" "> -\tOBD_ALLOC_WAIT(dest, MAX_STRING_SIZE + 1);\n" "> +\tdest = kzalloc(MAX_STRING_SIZE + 1, GFP_KERNEL);\n" - "> \tif (dest = NULL)\n" + "> \tif (dest == NULL)\n" "> \t\treturn NULL;\n" "> \n" "> @@ -289,7 +289,7 @@ struct proc_dir_entry *lprocfs_add_symli\n" @@ -617,7 +617,7 @@ "> \n" "> -\tOBD_ALLOC_PTR(new_stat);\n" "> +\tnew_stat = kzalloc(sizeof(*new_stat), GFP_NOFS);\n" - "> \tif (new_stat = NULL)\n" + "> \tif (new_stat == NULL)\n" "> \t\treturn -ENOMEM;\n" "> \n" "> @@ -1711,7 +1711,7 @@ int lprocfs_exp_setup(struct obd_export\n" @@ -626,7 +626,7 @@ "> \t/* not found - create */\n" "> -\tOBD_ALLOC(buffer, LNET_NIDSTR_SIZE);\n" "> +\tbuffer = kzalloc(LNET_NIDSTR_SIZE, GFP_NOFS);\n" - "> \tif (buffer = NULL) {\n" + "> \tif (buffer == NULL) {\n" "> \t\trc = -ENOMEM;\n" "> \t\tgoto destroy_new;\n" "> @@ -1721,7 +1721,7 @@ int lprocfs_exp_setup(struct obd_export\n" @@ -677,13 +677,13 @@ "> \n" "> -\tOBD_ALLOC_PTR(loghandle);\n" "> +\tloghandle = kzalloc(sizeof(*loghandle), GFP_NOFS);\n" - "> \tif (loghandle = NULL)\n" + "> \tif (loghandle == NULL)\n" "> \t\treturn NULL;\n" "> \n" "> @@ -88,9 +88,9 @@ static void llog_free_handle(struct llog\n" "> \telse if (loghandle->lgh_hdr->llh_flags & LLOG_F_IS_CAT)\n" "> \t\tLASSERT(list_empty(&loghandle->u.chd.chd_head));\n" - "> \tLASSERT(sizeof(*(loghandle->lgh_hdr)) = LLOG_CHUNK_SIZE);\n" + "> \tLASSERT(sizeof(*(loghandle->lgh_hdr)) == LLOG_CHUNK_SIZE);\n" "> -\tOBD_FREE(loghandle->lgh_hdr, LLOG_CHUNK_SIZE);\n" "> +\tkfree(loghandle->lgh_hdr);\n" "> out:\n" @@ -694,11 +694,11 @@ "> void llog_handle_get(struct llog_handle *loghandle)\n" "> @@ -207,7 +207,7 @@ int llog_init_handle(const struct lu_env\n" "> \n" - "> \tLASSERT(handle->lgh_hdr = NULL);\n" + "> \tLASSERT(handle->lgh_hdr == NULL);\n" "> \n" "> -\tOBD_ALLOC_PTR(llh);\n" "> +\tllh = kzalloc(sizeof(*llh), GFP_NOFS);\n" - "> \tif (llh = NULL)\n" + "> \tif (llh == NULL)\n" "> \t\treturn -ENOMEM;\n" "> \thandle->lgh_hdr = llh;\n" "> @@ -261,7 +261,7 @@ int llog_init_handle(const struct lu_env\n" @@ -734,7 +734,7 @@ "> \n" "> -\tOBD_ALLOC_PTR(lpi);\n" "> +\tlpi = kzalloc(sizeof(*lpi), GFP_NOFS);\n" - "> \tif (lpi = NULL) {\n" + "> \tif (lpi == NULL) {\n" "> \t\tCERROR(\"cannot alloc pointer\\n\");\n" "> \t\treturn -ENOMEM;\n" "> @@ -454,7 +454,7 @@ int llog_process_or_fork(const struct lu\n" @@ -782,7 +782,7 @@ "> \trc = -ENOMEM;\n" "> -\tOBD_ALLOC(type, sizeof(*type));\n" "> +\ttype = kzalloc(sizeof(*type), GFP_NOFS);\n" - "> \tif (type = NULL)\n" + "> \tif (type == NULL)\n" "> \t\treturn rc;\n" "> \n" "> -\tOBD_ALLOC_PTR(type->typ_dt_ops);\n" @@ -792,8 +792,8 @@ "> +\ttype->typ_md_ops = kzalloc(sizeof(*type->typ_md_ops), GFP_NOFS);\n" "> +\ttype->typ_name = kzalloc(strlen(name) + 1, GFP_NOFS);\n" "> \n" - "> \tif (type->typ_dt_ops = NULL ||\n" - "> \t type->typ_md_ops = NULL ||\n" + "> \tif (type->typ_dt_ops == NULL ||\n" + "> \t type->typ_md_ops == NULL ||\n" "> @@ -214,12 +214,12 @@ int class_register_type(struct obd_ops *\n" "> \n" "> failed:\n" @@ -865,14 +865,14 @@ "> +\t\tkfree(imp_conn);\n" "> \t}\n" "> \n" - "> \tLASSERT(imp->imp_sec = NULL);\n" + "> \tLASSERT(imp->imp_sec == NULL);\n" "> @@ -1008,7 +1008,7 @@ struct obd_import *class_new_import(stru\n" "> {\n" "> \tstruct obd_import *imp;\n" "> \n" "> -\tOBD_ALLOC(imp, sizeof(*imp));\n" "> +\timp = kzalloc(sizeof(*imp), GFP_NOFS);\n" - "> \tif (imp = NULL)\n" + "> \tif (imp == NULL)\n" "> \t\treturn NULL;\n" "> \n" "> @@ -1811,7 +1811,7 @@ void *kuc_alloc(int payload_len, int tra\n" @@ -881,7 +881,7 @@ "> \n" "> -\tOBD_ALLOC(lh, len);\n" "> +\tlh = kzalloc(len, GFP_NOFS);\n" - "> \tif (lh = NULL)\n" + "> \tif (lh == NULL)\n" "> \t\treturn ERR_PTR(-ENOMEM);\n" "> \n" "> @@ -1828,6 +1828,6 @@ EXPORT_SYMBOL(kuc_alloc);\n" @@ -901,7 +901,7 @@ "> \t\t}\n" "> -\t\tOBD_ALLOC(lcfg, data->ioc_plen1);\n" "> +\t\tlcfg = kzalloc(data->ioc_plen1, GFP_NOFS);\n" - "> \t\tif (lcfg = NULL) {\n" + "> \t\tif (lcfg == NULL) {\n" "> \t\t\terr = -ENOMEM;\n" "> \t\t\tgoto out;\n" "> @@ -243,7 +243,7 @@ int class_handle_ioctl(unsigned int cmd,\n" @@ -1007,7 +1007,7 @@ "> \n" "> -\tOBD_ALLOC(new, new_size);\n" "> +\tnew = kzalloc(new_size, GFP_NOFS);\n" - "> \tif (unlikely(new = NULL))\n" + "> \tif (unlikely(new == NULL))\n" "> \t\treturn -ENOMEM;\n" "> \n" "> \tmemcpy(new, *header, new_size);\n" @@ -1022,7 +1022,7 @@ "> \n" "> -\tOBD_ALLOC(new, ext_size);\n" "> +\tnew = kzalloc(ext_size, GFP_NOFS);\n" - "> \tif (unlikely(new = NULL))\n" + "> \tif (unlikely(new == NULL))\n" "> \t\treturn -ENOMEM;\n" "> \n" "> \tmemcpy(new, *header, ext_size);\n" @@ -1037,7 +1037,7 @@ "> \tesize = CFS_ACL_XATTR_SIZE(count, ext_acl_xattr);\n" "> -\tOBD_ALLOC(new, esize);\n" "> +\tnew = kzalloc(esize, GFP_NOFS);\n" - "> \tif (unlikely(new = NULL))\n" + "> \tif (unlikely(new == NULL))\n" "> \t\treturn ERR_PTR(-ENOMEM);\n" "> \n" "> @@ -183,7 +183,7 @@ int lustre_posix_acl_xattr_filter(posix_\n" @@ -1046,7 +1046,7 @@ "> \n" "> -\tOBD_ALLOC(new, size);\n" "> +\tnew = kzalloc(size, GFP_NOFS);\n" - "> \tif (unlikely(new = NULL))\n" + "> \tif (unlikely(new == NULL))\n" "> \t\treturn -ENOMEM;\n" "> \n" "> @@ -232,7 +232,7 @@ int lustre_posix_acl_xattr_filter(posix_\n" @@ -1083,15 +1083,16 @@ "> \t\tposix_size = CFS_ACL_XATTR_SIZE(posix_count, posix_acl_xattr);\n" "> -\t\tOBD_ALLOC(new, posix_size);\n" "> +\t\tnew = kzalloc(posix_size, GFP_NOFS);\n" - "> \t\tif (unlikely(new = NULL))\n" + "> \t\tif (unlikely(new == NULL))\n" "> \t\t\treturn -ENOMEM;\n" "> \n" "> @@ -360,7 +359,7 @@ int lustre_acl_xattr_merge2posix(posix_a\n" "> \t\tposix_count = ori_posix_count + ext_count;\n" - "> \t\tposix_size > \t\t\tCFS_ACL_XATTR_SIZE(posix_count, posix_acl_xattr);\n" + "> \t\tposix_size =\n" + "> \t\t\tCFS_ACL_XATTR_SIZE(posix_count, posix_acl_xattr);\n" "> -\t\tOBD_ALLOC(new, posix_size);\n" "> +\t\tnew = kzalloc(posix_size, GFP_NOFS);\n" - "> \t\tif (unlikely(new = NULL))\n" + "> \t\tif (unlikely(new == NULL))\n" "> \t\t\treturn -ENOMEM;\n" "> \n" "> @@ -402,7 +401,7 @@ int lustre_acl_xattr_merge2posix(posix_a\n" @@ -1109,7 +1110,7 @@ "> \n" "> -\tOBD_ALLOC(new, ext_size);\n" "> +\tnew = kzalloc(ext_size, GFP_NOFS);\n" - "> \tif (unlikely(new = NULL))\n" + "> \tif (unlikely(new == NULL))\n" "> \t\treturn ERR_PTR(-ENOMEM);\n" "> \n" "> @@ -538,7 +537,7 @@ lustre_acl_xattr_merge2ext(posix_acl_xat\n" @@ -1128,4 +1129,4 @@ "> More majordomo info at http://vger.kernel.org/majordomo-info.html\n" > -63e43ae66e1ba2fe95384a098ce094908c9afdb386b94db4f7f00b8d5abb6711 +fdbd76352c2ba4c90911b4cb9eb5d782de9e7c75da1880c92b502cd3ad936c20
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.