[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c16b8b0c-3935-4d52-eb7f-809d571142b5@roeck-us.net>
Date: Fri, 14 Oct 2022 06:26:48 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Zhang Rui <rui.zhang@...el.com>, linux-kernel@...r.kernel.org,
x86@...nel.org, linux-hwmon@...r.kernel.org
Cc: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, hpa@...or.com, peterz@...radead.org,
jdelvare@...e.com, len.brown@...el.com
Subject: Re: [PATCH V4 1/4] hwmon/coretemp: Rename indx to index
On 10/14/22 02:01, Zhang Rui wrote:
> Use variable name 'index' instead of 'indx' for the index in the
> core_data[] array.
>
> No functional change expected.
>
> Cc: stable@...r.kernel.org
> Suggested-by: Ingo Molnar <mingo@...nel.org>
> Signed-off-by: Zhang Rui <rui.zhang@...el.com>
Acked-by: Guenter Roeck <linux@...ck-us.net>
> ---
> drivers/hwmon/coretemp.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
> index ccf0af5b988a..bfdcfe8ccb34 100644
> --- a/drivers/hwmon/coretemp.c
> +++ b/drivers/hwmon/coretemp.c
> @@ -515,15 +515,15 @@ coretemp_add_core(struct platform_device *pdev, unsigned int cpu, int pkg_flag)
> dev_err(&pdev->dev, "Adding Core %u failed\n", cpu);
> }
>
> -static void coretemp_remove_core(struct platform_data *pdata, int indx)
> +static void coretemp_remove_core(struct platform_data *pdata, int index)
> {
> - struct temp_data *tdata = pdata->core_data[indx];
> + struct temp_data *tdata = pdata->core_data[index];
>
> /* Remove the sysfs attributes */
> sysfs_remove_group(&pdata->hwmon_dev->kobj, &tdata->attr_group);
>
> - kfree(pdata->core_data[indx]);
> - pdata->core_data[indx] = NULL;
> + kfree(pdata->core_data[index]);
> + pdata->core_data[index] = NULL;
> }
>
> static int coretemp_probe(struct platform_device *pdev)
> @@ -647,7 +647,7 @@ static int coretemp_cpu_offline(unsigned int cpu)
> struct platform_device *pdev = coretemp_get_pdev(cpu);
> struct platform_data *pd;
> struct temp_data *tdata;
> - int indx, target;
> + int index, target;
>
> /*
> * Don't execute this on suspend as the device remove locks
> @@ -661,12 +661,12 @@ static int coretemp_cpu_offline(unsigned int cpu)
> return 0;
>
> /* The core id is too big, just return */
> - indx = TO_ATTR_NO(cpu);
> - if (indx > MAX_CORE_DATA - 1)
> + index = TO_ATTR_NO(cpu);
> + if (index > MAX_CORE_DATA - 1)
> return 0;
>
> pd = platform_get_drvdata(pdev);
> - tdata = pd->core_data[indx];
> + tdata = pd->core_data[index];
>
> cpumask_clear_cpu(cpu, &pd->cpumask);
>
> @@ -677,7 +677,7 @@ static int coretemp_cpu_offline(unsigned int cpu)
> */
> target = cpumask_any_and(&pd->cpumask, topology_sibling_cpumask(cpu));
> if (target >= nr_cpu_ids) {
> - coretemp_remove_core(pd, indx);
> + coretemp_remove_core(pd, index);
> } else if (tdata && tdata->cpu == cpu) {
> mutex_lock(&tdata->update_lock);
> tdata->cpu = target;
Powered by blists - more mailing lists