lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ