]> git.baikalelectronics.ru Git - kernel.git/commitdiff
HID: asus: Remove unused variable in asus_report_tool_width()
authorColin Ian King <colin.i.king@gmail.com>
Mon, 24 Oct 2022 16:11:02 +0000 (17:11 +0100)
committerJiri Kosina <jkosina@suse.cz>
Wed, 2 Nov 2022 13:11:06 +0000 (14:11 +0100)
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>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-asus.c

index b59c3dafa6a48de3cebd53e14c2475e01485dd6a..f99752b998f3d8fc0a7a01c8f49a59c600b965cc 100644 (file)
@@ -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) {