diff for duplicates of <20120507135220.GA2381@ericsson.com> diff --git a/a/1.txt b/N1/1.txt index 20ab031..e8fb39f 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -69,7 +69,7 @@ On Mon, May 07, 2012 at 06:34:08AM -0400, Kirill A. Shutemov wrote: > + > + mutex_lock(&pdata->temp_data_lock); > + list_for_each_entry(tdata, &pdata->temp_data_list, list) -> + if (tdata->id = id) +> + if (tdata->id == id) > + goto out; > + tdata = NULL; > +out: @@ -167,7 +167,7 @@ Unnecessary whitespace change. > - return 0; > + mutex_lock(&pdata->temp_data_lock); > + list_for_each_entry(tdata, &pdata->temp_data_list, list) { -> + if (tdata->id = attr_no) { +> + if (tdata->id == attr_no) { > + mutex_unlock(&pdata->temp_data_lock); > + return 0; > + } @@ -338,10 +338,10 @@ Using goto here is really unnecessary here. > - return; > + attr_no = TO_ATTR_NO(cpu); > -> - if (pdata->core_data[indx] && pdata->core_data[indx]->cpu = cpu) +> - if (pdata->core_data[indx] && pdata->core_data[indx]->cpu == cpu) > - coretemp_remove_core(pdata, &pdev->dev, indx); > + tdata = get_temp_data(pdata, attr_no); -> + if (tdata && tdata->cpu = cpu) +> + if (tdata && tdata->cpu == cpu) > + coretemp_remove_core(tdata, &pdev->dev); This call to coretemp_remove_core will not acquire the list mutex, which means @@ -352,9 +352,4 @@ you end up calling list_del() from coretemp_remove_core() without mutex protecti > * If a HT sibling of a core is taken offline, but another HT sibling > -- > 1.7.9.1 -> - -_______________________________________________ -lm-sensors mailing list -lm-sensors@lm-sensors.org -http://lists.lm-sensors.org/mailman/listinfo/lm-sensors +> diff --git a/a/content_digest b/N1/content_digest index fd223ce..9015fd4 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\01336386848-31041-1-git-send-email-kirill.shutemov@linux.intel.com\0" "From\0Guenter Roeck <guenter.roeck@ericsson.com>\0" - "Subject\0Re: [lm-sensors] [PATCH, v3] hwmon: coretemp: use list instead of fixed size array for temp\0" - "Date\0Mon, 07 May 2012 13:52:20 +0000\0" + "Subject\0Re: [PATCH, v3] hwmon: coretemp: use list instead of fixed size array for temp data\0" + "Date\0Mon, 7 May 2012 06:52:20 -0700\0" "To\0Kirill A. Shutemov <kirill.shutemov@linux.intel.com>\0" "Cc\0Fenghua Yu <fenghua.yu@intel.com>" Durgadoss R <durgadoss.r@intel.com> @@ -82,7 +82,7 @@ "> +\n" "> +\tmutex_lock(&pdata->temp_data_lock);\n" "> +\tlist_for_each_entry(tdata, &pdata->temp_data_list, list)\n" - "> +\t\tif (tdata->id = id)\n" + "> +\t\tif (tdata->id == id)\n" "> +\t\t\tgoto out;\n" "> +\ttdata = NULL;\n" "> +out:\n" @@ -180,7 +180,7 @@ "> -\t\treturn 0;\n" "> +\tmutex_lock(&pdata->temp_data_lock);\n" "> +\tlist_for_each_entry(tdata, &pdata->temp_data_list, list) {\n" - "> +\t\tif (tdata->id = attr_no) {\n" + "> +\t\tif (tdata->id == attr_no) {\n" "> +\t\t\tmutex_unlock(&pdata->temp_data_lock);\n" "> +\t\t\treturn 0;\n" "> +\t\t}\n" @@ -351,10 +351,10 @@ "> -\t\treturn;\n" "> +\tattr_no = TO_ATTR_NO(cpu);\n" "> \n" - "> -\tif (pdata->core_data[indx] && pdata->core_data[indx]->cpu = cpu)\n" + "> -\tif (pdata->core_data[indx] && pdata->core_data[indx]->cpu == cpu)\n" "> -\t\tcoretemp_remove_core(pdata, &pdev->dev, indx);\n" "> +\ttdata = get_temp_data(pdata, attr_no);\n" - "> +\tif (tdata && tdata->cpu = cpu)\n" + "> +\tif (tdata && tdata->cpu == cpu)\n" "> +\t\tcoretemp_remove_core(tdata, &pdev->dev);\n" "\n" "This call to coretemp_remove_core will not acquire the list mutex, which means\n" @@ -365,11 +365,6 @@ "> \t * If a HT sibling of a core is taken offline, but another HT sibling\n" "> -- \n" "> 1.7.9.1\n" - "> \n" - "\n" - "_______________________________________________\n" - "lm-sensors mailing list\n" - "lm-sensors@lm-sensors.org\n" - http://lists.lm-sensors.org/mailman/listinfo/lm-sensors + > -1f5cbbbb70f484851f8fc9255272f97aca1a8fc24d4ac8b6e5d71fa6ab616d3b +9654377e1cc86eac19178725bbd3f4568c7625f92e4ef7e07effe79b6886ffe3
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.