[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210329122617.76335c90@jic23-huawei>
Date: Mon, 29 Mar 2021 12:26:17 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Lee Jones <lee.jones@...aro.org>
Cc: linux-kernel@...r.kernel.org, Jiri Kosina <jikos@...nel.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
linux-input@...r.kernel.org, linux-iio@...r.kernel.org
Subject: Re: [PATCH 20/25] HID: hid-sensor-custom: Remove unused variable
'ret'
On Fri, 26 Mar 2021 14:34:53 +0000
Lee Jones <lee.jones@...aro.org> wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/hid/hid-sensor-custom.c: In function ‘store_value’:
> drivers/hid/hid-sensor-custom.c:400:7: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
>
> Cc: Jiri Kosina <jikos@...nel.org>
> Cc: Jonathan Cameron <jic23@...nel.org>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
> Cc: Benjamin Tissoires <benjamin.tissoires@...hat.com>
> Cc: linux-input@...r.kernel.org
> Cc: linux-iio@...r.kernel.org
> Signed-off-by: Lee Jones <lee.jones@...aro.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> ---
> drivers/hid/hid-sensor-custom.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid-sensor-custom.c
> index 2628bc53ed809..2e6662173a79c 100644
> --- a/drivers/hid/hid-sensor-custom.c
> +++ b/drivers/hid/hid-sensor-custom.c
> @@ -397,15 +397,14 @@ static ssize_t store_value(struct device *dev, struct device_attribute *attr,
>
> if (!strncmp(name, "value", strlen("value"))) {
> u32 report_id;
> - int ret;
>
> if (kstrtoint(buf, 0, &value) != 0)
> return -EINVAL;
>
> report_id = sensor_inst->fields[field_index].attribute.
> report_id;
> - ret = sensor_hub_set_feature(sensor_inst->hsdev, report_id,
> - index, sizeof(value), &value);
> + sensor_hub_set_feature(sensor_inst->hsdev, report_id,
> + index, sizeof(value), &value);
> } else
> return -EINVAL;
>
Powered by blists - more mailing lists