From: Colin Ian King <colin.i.king@gmail.com>
To: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
linux-input@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: [PATCH][next] HID: core: Remove redundant assignment to pointer field
Date: Wed, 2 Mar 2022 18:13:23 +0000 [thread overview]
Message-ID: <20220302181323.1100490-1-colin.i.king@gmail.com> (raw)
The pointer fields is being assigned a value that is never read, the
pointer is re-assigned a new value in for-loops that occur later on.
The assignment is redundant and can be removed.
Clean up clang scan build warning:
drivers/hid/hid-core.c:1665:30: warning: Although the value stored
to 'field' is used in the enclosing expression, the value is never
actually read from 'field' [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/hid/hid-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index db925794fbe6..6579f4724bbb 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1662,7 +1662,7 @@ static void hid_process_report(struct hid_device *hid,
/* first retrieve all incoming values in data */
for (a = 0; a < report->maxfield; a++)
- hid_input_fetch_field(hid, field = report->field[a], data);
+ hid_input_fetch_field(hid, report->field[a], data);
if (!list_empty(&report->field_entry_list)) {
/* INPUT_REPORT, we have a priority list of fields */
--
2.34.1
reply other threads:[~2022-03-02 18:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220302181323.1100490-1-colin.i.king@gmail.com \
--to=colin.i.king@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
/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).