All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][next] HID: core: Remove redundant assignment to pointer field
@ 2022-03-02 18:13 Colin Ian King
  0 siblings, 0 replies; only message in thread
From: Colin Ian King @ 2022-03-02 18:13 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires, linux-input
  Cc: kernel-janitors, linux-kernel, llvm

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-02 18:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02 18:13 [PATCH][next] HID: core: Remove redundant assignment to pointer field Colin Ian King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.