[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0iBL8bT1SHu4KKh7qgzq0nLAjrc6QY4oBEM-unhVFfs9w@mail.gmail.com>
Date: Wed, 23 Oct 2024 10:52:27 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Lukasz Luba <lukasz.luba@....com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, "Rafael J. Wysocki" <rjw@...ysocki.net>,
Linux PM <linux-pm@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>, Zhang Rui <rui.zhang@...el.com>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Subject: Re: [PATCH v2 09/11] thermal: core: Add and use cooling device guard
On Wed, Oct 23, 2024 at 12:24 AM Lukasz Luba <lukasz.luba@....com> wrote:
>
>
>
> On 10/14/24 13:26, Rafael J. Wysocki wrote:
> > On Fri, Oct 11, 2024 at 12:22 AM Rafael J. Wysocki <rjw@...ysocki.net> wrote:
> >>
> >> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> >>
> >> Add and use a special guard for cooling devices.
> >>
> >> This allows quite a few error code paths to be simplified among
> >> other things and brings in code size reduction for a good measure.
> >>
> >> No intentional functional impact.
> >>
> >> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> >> ---
> >>
> >> This is a new iteration of
> >>
> >> https://lore.kernel.org/linux-pm/1890654.atdPhlSkOF@rjwysocki.net/
> >>
> >> v1 -> v2: Rearrange cur_state_store()
> >>
> >> ---
> >> drivers/thermal/gov_power_allocator.c | 21 +++++++--------
> >> drivers/thermal/gov_step_wise.c | 6 ++--
> >> drivers/thermal/thermal_core.c | 17 +++---------
> >> drivers/thermal/thermal_debugfs.c | 25 +++++++++++-------
> >> drivers/thermal/thermal_helpers.c | 19 +++-----------
> >> drivers/thermal/thermal_sysfs.c | 45 ++++++++++++----------------------
> >> include/linux/thermal.h | 3 ++
> >> 7 files changed, 57 insertions(+), 79 deletions(-)
> >>
>
> [snip]
>
> >>
> >> stats = cdev->stats;
> >> - if (!stats) {
> >> - len = -ENODATA;
> >> - goto unlock;
> >> - }
> >> + if (!stats)
> >> + return -ENODATA;
> >>
> >> len += snprintf(buf + len, PAGE_SIZE - len, " From : To\n");
> >> len += snprintf(buf + len, PAGE_SIZE - len, " : ");
> >
> > There is one more "goto unlock" statement in this function that needs
> > to be replaced with "return".
> >
> > I'll send an update of it shortly.
> >
>
> OK, I will review that when it's ready.
It's been sent already:
https://lore.kernel.org/linux-pm/5837621.DvuYhMxLoT@rjwysocki.net/
Powered by blists - more mailing lists