From: Rafael J. Wysocki <[email protected]>
Make intel_pch_thermal_probe() use a const char pointer instead of
a struct board_info one for accessing the thermal zone name.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <[email protected]>
---
BTW, Srinivas, I'm wondering if user space would be terribly confused by
changing this driver to use "Intel PCH" as the thermal zone name of all
of the supported platforms?
---
drivers/thermal/intel/intel_pch_thermal.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: linux-pm/drivers/thermal/intel/intel_pch_thermal.c
===================================================================
--- linux-pm.orig/drivers/thermal/intel/intel_pch_thermal.c
+++ linux-pm/drivers/thermal/intel/intel_pch_thermal.c
@@ -175,7 +175,7 @@ static int intel_pch_thermal_probe(struc
const struct pci_device_id *id)
{
enum pch_board_ids board_id = id->driver_data;
- const struct board_info *bi = &board_info[board_id];
+ const char *zone_name = board_info[board_id].name;
struct pch_thermal_device *ptd;
u16 trip_temp;
int nr_trips;
@@ -249,12 +249,12 @@ read_trips:
nr_trips += pch_wpt_add_acpi_psv_trip(ptd, nr_trips);
- ptd->tzd = thermal_zone_device_register_with_trips(bi->name, ptd->trips,
+ ptd->tzd = thermal_zone_device_register_with_trips(zone_name, ptd->trips,
nr_trips, 0, ptd,
&tzd_ops, NULL, 0, 0);
if (IS_ERR(ptd->tzd)) {
dev_err(&pdev->dev, "Failed to register thermal zone %s\n",
- bi->name);
+ zone_name);
err = PTR_ERR(ptd->tzd);
goto error_cleanup;
}
On 30/01/2023 20:07, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <[email protected]>
>
> Make intel_pch_thermal_probe() use a const char pointer instead of
> a struct board_info one for accessing the thermal zone name.
>
> No intentional functional impact.
>
> Signed-off-by: Rafael J. Wysocki <[email protected]>
> ---
>
> BTW, Srinivas, I'm wondering if user space would be terribly confused by
> changing this driver to use "Intel PCH" as the thermal zone name of all
> of the supported platforms?
>
> ---
> drivers/thermal/intel/intel_pch_thermal.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Index: linux-pm/drivers/thermal/intel/intel_pch_thermal.c
> ===================================================================
> --- linux-pm.orig/drivers/thermal/intel/intel_pch_thermal.c
> +++ linux-pm/drivers/thermal/intel/intel_pch_thermal.c
> @@ -175,7 +175,7 @@ static int intel_pch_thermal_probe(struc
> const struct pci_device_id *id)
> {
> enum pch_board_ids board_id = id->driver_data;
> - const struct board_info *bi = &board_info[board_id];
> + const char *zone_name = board_info[board_id].name;
Assuming you will change 'board_info[board_id].name' by
'board_info[board_id]'
Acked-by: Daniel Lezcano <[email protected]>
> struct pch_thermal_device *ptd;
> u16 trip_temp;
> int nr_trips;
> @@ -249,12 +249,12 @@ read_trips:
>
> nr_trips += pch_wpt_add_acpi_psv_trip(ptd, nr_trips);
>
> - ptd->tzd = thermal_zone_device_register_with_trips(bi->name, ptd->trips,
> + ptd->tzd = thermal_zone_device_register_with_trips(zone_name, ptd->trips,
> nr_trips, 0, ptd,
> &tzd_ops, NULL, 0, 0);
> if (IS_ERR(ptd->tzd)) {
> dev_err(&pdev->dev, "Failed to register thermal zone %s\n",
> - bi->name);
> + zone_name);
> err = PTR_ERR(ptd->tzd);
> goto error_cleanup;
> }
>
>
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
On Tue, Jan 31, 2023 at 5:02 PM Daniel Lezcano
<[email protected]> wrote:
>
> On 30/01/2023 20:07, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <[email protected]>
> >
> > Make intel_pch_thermal_probe() use a const char pointer instead of
> > a struct board_info one for accessing the thermal zone name.
> >
> > No intentional functional impact.
> >
> > Signed-off-by: Rafael J. Wysocki <[email protected]>
> > ---
> >
> > BTW, Srinivas, I'm wondering if user space would be terribly confused by
> > changing this driver to use "Intel PCH" as the thermal zone name of all
> > of the supported platforms?
> >
> > ---
> > drivers/thermal/intel/intel_pch_thermal.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > Index: linux-pm/drivers/thermal/intel/intel_pch_thermal.c
> > ===================================================================
> > --- linux-pm.orig/drivers/thermal/intel/intel_pch_thermal.c
> > +++ linux-pm/drivers/thermal/intel/intel_pch_thermal.c
> > @@ -175,7 +175,7 @@ static int intel_pch_thermal_probe(struc
> > const struct pci_device_id *id)
> > {
> > enum pch_board_ids board_id = id->driver_data;
> > - const struct board_info *bi = &board_info[board_id];
> > + const char *zone_name = board_info[board_id].name;
>
> Assuming you will change 'board_info[board_id].name' by
> 'board_info[board_id]'
Hmm, why would that be required?
> Acked-by: Daniel Lezcano <[email protected]>
Anyway, though, I'm planning to use this replacement patch instead of
the $subject one:
https://lore.kernel.org/linux-pm/12166249.O9o76ZdvQC@kreacher/
On 31/01/2023 20:20, Rafael J. Wysocki wrote:
> On Tue, Jan 31, 2023 at 5:02 PM Daniel Lezcano
> <[email protected]> wrote:
>>
>> On 30/01/2023 20:07, Rafael J. Wysocki wrote:
>>> From: Rafael J. Wysocki <[email protected]>
>>>
>>> Make intel_pch_thermal_probe() use a const char pointer instead of
>>> a struct board_info one for accessing the thermal zone name.
>>>
>>> No intentional functional impact.
>>>
>>> Signed-off-by: Rafael J. Wysocki <[email protected]>
>>> ---
>>>
>>> BTW, Srinivas, I'm wondering if user space would be terribly confused by
>>> changing this driver to use "Intel PCH" as the thermal zone name of all
>>> of the supported platforms?
>>>
>>> ---
>>> drivers/thermal/intel/intel_pch_thermal.c | 6 +++---
>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> Index: linux-pm/drivers/thermal/intel/intel_pch_thermal.c
>>> ===================================================================
>>> --- linux-pm.orig/drivers/thermal/intel/intel_pch_thermal.c
>>> +++ linux-pm/drivers/thermal/intel/intel_pch_thermal.c
>>> @@ -175,7 +175,7 @@ static int intel_pch_thermal_probe(struc
>>> const struct pci_device_id *id)
>>> {
>>> enum pch_board_ids board_id = id->driver_data;
>>> - const struct board_info *bi = &board_info[board_id];
>>> + const char *zone_name = board_info[board_id].name;
>>
>> Assuming you will change 'board_info[board_id].name' by
>> 'board_info[board_id]'
>
> Hmm, why would that be required?
I meant board_names[board_id] (related to the change proposed in the
patch replacement below)
>> Acked-by: Daniel Lezcano <[email protected]>
>
> Anyway, though, I'm planning to use this replacement patch instead of
> the $subject one:
>
> https://lore.kernel.org/linux-pm/12166249.O9o76ZdvQC@kreacher/
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog