linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][V2] hid: intel-ish-hid: ishtp: remove variable rb_count
@ 2022-10-20 21:02 Colin Ian King
  2022-11-12 16:10 ` srinivas pandruvada
  2022-11-14 16:25 ` Jiri Kosina
  0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2022-10-20 21:02 UTC (permalink / raw)
  To: Srinivas Pandruvada, Jiri Kosina, Benjamin Tissoires, Even Xu,
	linux-input
  Cc: kernel-janitors, linux-kernel

The variable rb_count is being incremented but it
is never referenced, it is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
V2: Fix commit message.
---
 drivers/hid/intel-ish-hid/ishtp/client.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/hid/intel-ish-hid/ishtp/client.c b/drivers/hid/intel-ish-hid/ishtp/client.c
index df0a825694f5..2d92fc129ce4 100644
--- a/drivers/hid/intel-ish-hid/ishtp/client.c
+++ b/drivers/hid/intel-ish-hid/ishtp/client.c
@@ -841,7 +841,6 @@ void recv_ishtp_cl_msg(struct ishtp_device *dev,
 	unsigned char *buffer = NULL;
 	struct ishtp_cl_rb *complete_rb = NULL;
 	unsigned long	flags;
-	int	rb_count;
 
 	if (ishtp_hdr->reserved) {
 		dev_err(dev->devc, "corrupted message header.\n");
@@ -855,9 +854,7 @@ void recv_ishtp_cl_msg(struct ishtp_device *dev,
 	}
 
 	spin_lock_irqsave(&dev->read_list_spinlock, flags);
-	rb_count = -1;
 	list_for_each_entry(rb, &dev->read_list.list, list) {
-		++rb_count;
 		cl = rb->cl;
 		if (!cl || !(cl->host_client_id == ishtp_hdr->host_addr &&
 				cl->fw_client_id == ishtp_hdr->fw_addr) ||
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-14 16:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-20 21:02 [PATCH][V2] hid: intel-ish-hid: ishtp: remove variable rb_count Colin Ian King
2022-11-12 16:10 ` srinivas pandruvada
2022-11-14 16:25 ` Jiri Kosina

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).