[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9750e644-8939-4ea2-a2fb-d2c7d7fbb264@linaro.org>
Date: Mon, 4 Dec 2023 22:44:18 +0100
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Lukasz Luba <lukasz.luba@....com>,
Linux PM <linux-pm@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Zhang Rui <rui.zhang@...el.com>
Subject: Re: [PATCH v3 1/2] thermal: sysfs: Rework the handling of trip point
updates
On 04/12/2023 18:47, Rafael J. Wysocki wrote:
[ ... ]
>>> +static int check_thermal_zone_and_trip_id(struct device *dev,
>>> + struct thermal_zone_device *tz,
>>> + int trip_id)
>>> +{
>>> + if (!device_is_registered(dev))
>>> + return -ENODEV;
>>> +
>>> + if (trip_id < 0 || trip_id >= tz->num_trips)
>>> + return -EINVAL;
>>
>> I'm not sure if this check is useful. The function is called from
>> trip_point_*_store() which is providing the trip id from the file name
>> parsing which is in turn built from an existing trip id. There is no
>> reason the trip id is going to be wrong.
>
> I can drop the check just fine.
>
> Do you have any other comments on this patch?
No, the rest LGTM
--
<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
Powered by blists - more mailing lists