[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <64e98df-1663-1630-e2bf-5472aced5cac@linux.intel.com>
Date: Wed, 19 Apr 2023 16:35:11 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
cc: hdegoede@...hat.com, markgross@...nel.org,
platform-driver-x86@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
Zhang Rui <rui.zhang@...el.com>,
Wendy Wang <wendy.wang@...el.com>
Subject: Re: [PATCH] platform/x86/intel-uncore-freq: Return error on write
frequency
On Tue, 18 Apr 2023, Srinivas Pandruvada wrote:
> Currently when the uncore_write() returns error, it is silently
> ignored. Return error to user space when uncore_write() fails.
>
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
> Reviewed-by: Zhang Rui <rui.zhang@...el.com>
> Tested-by: Wendy Wang <wendy.wang@...el.com>
> ---
> This patch has no dependency on TPMI patches for uncore support.
>
> .../x86/intel/uncore-frequency/uncore-frequency-common.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c
> index cb24de9e97dc..fa8f14c925ec 100644
> --- a/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c
> +++ b/drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.c
> @@ -44,14 +44,18 @@ static ssize_t store_min_max_freq_khz(struct uncore_data *data,
> int min_max)
> {
> unsigned int input;
> + int ret;
>
> if (kstrtouint(buf, 10, &input))
> return -EINVAL;
>
> mutex_lock(&uncore_lock);
> - uncore_write(data, input, min_max);
> + ret = uncore_write(data, input, min_max);
> mutex_unlock(&uncore_lock);
>
> + if (ret)
> + return ret;
> +
> return count;
> }
Shouldn't this have Fixes tag?
Other than that,
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
--
i.
Powered by blists - more mailing lists