diff for duplicates of <87lf6bo7v0.fsf@linux.ibm.com> diff --git a/a/1.txt b/N1/1.txt index 3f13686..3a66baa 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -285,7 +285,7 @@ kmalloc later. > + int idx, ret = 0; > + > + for (idx = 0; idx < be64_to_cpu(esi_hdr->num_attrs); idx++) { -> + if (pattr->id = be64_to_cpu(esi_attrs[idx].id)) { +> + if (pattr->id == be64_to_cpu(esi_attrs[idx].id)) { > + ret = sprintf(buf, "%s\n", esi_attrs[idx].desc); We know the size of desc, so could use snprintf here. @@ -314,7 +314,7 @@ We know the size of desc, so could use snprintf here. > + int ret = 0; > + > + t_buf = kmalloc(MAX_BUF_SZ, GFP_KERNEL); -> + if (t_buf = NULL) +> + if (t_buf == NULL) > + return -ENOMEM; > + > + ret = plpar_hcall_norets(H_GET_ENERGY_SCALE_INFO, ESI_FLAGS_SINGLE, @@ -358,7 +358,7 @@ snprintf > + int ret = 0; > + > + t_buf = kmalloc(MAX_BUF_SZ, GFP_KERNEL); -> + if (t_buf = NULL) +> + if (t_buf == NULL) > + return -ENOMEM; > + > + ret = plpar_hcall_norets(H_GET_ENERGY_SCALE_INFO, ESI_FLAGS_SINGLE, @@ -436,7 +436,7 @@ snprintf This memory is never released. I don't think it's worth it just to save a hcall. -> + if (esi_buf = NULL) +> + if (esi_buf == NULL) > + return -ENOMEM; > + /* > + * hcall( @@ -521,7 +521,7 @@ stack allocated 'buf' to another function. > + pgs[idx].pg.name = buf; > + > + /* Do not add the value description if it does not exist */ -> + if (strlen(esi_attrs[idx].value_desc) = 0) +> + if (strlen(esi_attrs[idx].value_desc) == 0) > + show_val_desc = false; > + > + if (add_attr_group(be64_to_cpu(esi_attrs[idx].id), diff --git a/a/content_digest b/N1/content_digest index def6dae..bebd3a2 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -2,7 +2,7 @@ "ref\020210712105140.33388-2-psampat@linux.ibm.com\0" "From\0Fabiano Rosas <farosas@linux.ibm.com>\0" "Subject\0Re: [PATCH v3 1/1] powerpc/pseries: Interface to represent PAPR firmware attributes\0" - "Date\0Mon, 12 Jul 2021 15:43:47 +0000\0" + "Date\0Mon, 12 Jul 2021 12:43:47 -0300\0" "To\0Pratik R. Sampat <psampat@linux.ibm.com>" mpe@ellerman.id.au benh@kernel.crashing.org @@ -301,7 +301,7 @@ "> +\tint idx, ret = 0;\n" "> +\n" "> +\tfor (idx = 0; idx < be64_to_cpu(esi_hdr->num_attrs); idx++) {\n" - "> +\t\tif (pattr->id = be64_to_cpu(esi_attrs[idx].id)) {\n" + "> +\t\tif (pattr->id == be64_to_cpu(esi_attrs[idx].id)) {\n" "> +\t\t\tret = sprintf(buf, \"%s\\n\", esi_attrs[idx].desc);\n" "\n" "We know the size of desc, so could use snprintf here.\n" @@ -330,7 +330,7 @@ "> +\tint ret = 0;\n" "> +\n" "> +\tt_buf = kmalloc(MAX_BUF_SZ, GFP_KERNEL);\n" - "> +\tif (t_buf = NULL)\n" + "> +\tif (t_buf == NULL)\n" "> +\t\treturn -ENOMEM;\n" "> +\n" "> +\tret = plpar_hcall_norets(H_GET_ENERGY_SCALE_INFO, ESI_FLAGS_SINGLE,\n" @@ -374,7 +374,7 @@ "> +\tint ret = 0;\n" "> +\n" "> +\tt_buf = kmalloc(MAX_BUF_SZ, GFP_KERNEL);\n" - "> +\tif (t_buf = NULL)\n" + "> +\tif (t_buf == NULL)\n" "> +\t\treturn -ENOMEM;\n" "> +\n" "> +\tret = plpar_hcall_norets(H_GET_ENERGY_SCALE_INFO, ESI_FLAGS_SINGLE,\n" @@ -452,7 +452,7 @@ "This memory is never released. I don't think it's worth it just to save\n" "a hcall.\n" "\n" - "> +\tif (esi_buf = NULL)\n" + "> +\tif (esi_buf == NULL)\n" "> +\t\treturn -ENOMEM;\n" "> +\t/*\n" "> +\t * hcall(\n" @@ -537,7 +537,7 @@ "> +\t\tpgs[idx].pg.name = buf;\n" "> +\n" "> +\t\t/* Do not add the value description if it does not exist */\n" - "> +\t\tif (strlen(esi_attrs[idx].value_desc) = 0)\n" + "> +\t\tif (strlen(esi_attrs[idx].value_desc) == 0)\n" "> +\t\t\tshow_val_desc = false;\n" "> +\n" "> +\t\tif (add_attr_group(be64_to_cpu(esi_attrs[idx].id),\n" @@ -569,4 +569,4 @@ "> +\n" > +machine_device_initcall(pseries, papr_init); -caafd03f6230dd0e105d327d1fc9019cf6d9b157724d30f6fa4b5884e4f46567 +cbb7468d13744e29c2848151bbbc973fb83f45e9951d90413de34550caa8c905
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.