linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: asus: Remove variable count
@ 2022-10-24 16:11 Colin Ian King
  2022-11-02 13:11 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-10-24 16:11 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires, linux-input
  Cc: kernel-janitors, linux-kernel

Variable count is just being incremented and it's never used
anywhere else. The variable and the increment are redundant so
remove it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/hid/hid-asus.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index b59c3dafa6a4..f99752b998f3 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -219,14 +219,13 @@ static void asus_report_tool_width(struct asus_drvdata *drvdat)
 {
 	struct input_mt *mt = drvdat->input->mt;
 	struct input_mt_slot *oldest;
-	int oldid, count, i;
+	int oldid, i;
 
 	if (drvdat->tp->contact_size < 5)
 		return;
 
 	oldest = NULL;
 	oldid = mt->trkid;
-	count = 0;
 
 	for (i = 0; i < mt->num_slots; ++i) {
 		struct input_mt_slot *ps = &mt->slots[i];
@@ -238,7 +237,6 @@ static void asus_report_tool_width(struct asus_drvdata *drvdat)
 			oldest = ps;
 			oldid = id;
 		}
-		count++;
 	}
 
 	if (oldest) {
-- 
2.37.3


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

* Re: [PATCH] HID: asus: Remove variable count
  2022-10-24 16:11 [PATCH] HID: asus: Remove variable count Colin Ian King
@ 2022-11-02 13:11 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2022-11-02 13:11 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Benjamin Tissoires, linux-input, kernel-janitors, linux-kernel

On Mon, 24 Oct 2022, Colin Ian King wrote:

> Variable count is just being incremented and it's never used
> anywhere else. The variable and the increment are redundant so
> remove it.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  drivers/hid/hid-asus.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
> index b59c3dafa6a4..f99752b998f3 100644
> --- a/drivers/hid/hid-asus.c
> +++ b/drivers/hid/hid-asus.c
> @@ -219,14 +219,13 @@ static void asus_report_tool_width(struct asus_drvdata *drvdat)
>  {
>  	struct input_mt *mt = drvdat->input->mt;
>  	struct input_mt_slot *oldest;
> -	int oldid, count, i;
> +	int oldid, i;
>  
>  	if (drvdat->tp->contact_size < 5)
>  		return;
>  
>  	oldest = NULL;
>  	oldid = mt->trkid;
> -	count = 0;
>  
>  	for (i = 0; i < mt->num_slots; ++i) {
>  		struct input_mt_slot *ps = &mt->slots[i];
> @@ -238,7 +237,6 @@ static void asus_report_tool_width(struct asus_drvdata *drvdat)
>  			oldest = ps;
>  			oldid = id;
>  		}
> -		count++;
>  	}

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs


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

end of thread, other threads:[~2022-11-02 13:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-24 16:11 [PATCH] HID: asus: Remove variable count Colin Ian King
2022-11-02 13:11 ` 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).