Skip to content

Commit

Permalink
HID: asus: Remove unused variable in asus_report_tool_width()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
ColinIanKing authored and Jiri Kosina committed Nov 2, 2022
1 parent e66928a commit 7f9dbf5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/hid/hid-asus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -238,7 +237,6 @@ static void asus_report_tool_width(struct asus_drvdata *drvdat)
oldest = ps;
oldid = id;
}
count++;
}

if (oldest) {
Expand Down

0 comments on commit 7f9dbf5

Please sign in to comment.