From: Lee Jones <lee.jones@linaro.org>
To: lee.jones@linaro.org
Cc: linux-kernel@vger.kernel.org, Jiri Kosina <jikos@kernel.org>,
Jonathan Cameron <jic23@kernel.org>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
linux-input@vger.kernel.org, linux-iio@vger.kernel.org
Subject: [PATCH 20/25] HID: hid-sensor-custom: Remove unused variable 'ret'
Date: Fri, 26 Mar 2021 14:34:53 +0000 [thread overview]
Message-ID: <20210326143458.508959-22-lee.jones@linaro.org> (raw)
In-Reply-To: <20210326143458.508959-1-lee.jones@linaro.org>
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@kernel.org>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: linux-input@vger.kernel.org
Cc: linux-iio@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
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;
--
2.27.0
next prev parent reply other threads:[~2021-03-26 14:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-26 14:34 [RESEND 00/25] Rid W=1 warnings from HID Lee Jones
2021-03-26 14:34 ` Lee Jones
2021-03-26 14:34 ` Lee Jones [this message]
2021-03-29 11:26 ` [PATCH 20/25] HID: hid-sensor-custom: Remove unused variable 'ret' Jonathan Cameron
2021-03-26 14:34 ` [PATCH 22/25] HID: hid-sensor-hub: Remove unused struct member 'quirks' Lee Jones
2021-03-29 11:27 ` Jonathan Cameron
2021-03-26 14:34 ` [PATCH 23/25] HID: hid-sensor-hub: Move 'hsdev' description to correct struct definition Lee Jones
2021-03-29 11:30 ` Jonathan Cameron
2021-03-29 13:00 ` Lee Jones
2021-03-29 15:22 ` Jonathan Cameron
2021-04-06 8:56 ` [RESEND 00/25] Rid W=1 warnings from HID Lee Jones
2021-04-07 16:09 ` Benjamin Tissoires
2021-04-08 7:06 ` Lee Jones
2021-04-08 11:43 ` Benjamin Tissoires
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210326143458.508959-22-lee.jones@linaro.org \
--to=lee.jones@linaro.org \
--cc=benjamin.tissoires@redhat.com \
--cc=jic23@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).