Skip to contentSkip to conversation

Input: evdev - Avoid duplicate checking of empty SYN_REPORT

PATCH In review Aniroop Mathur 2 participants 2 messages Dec 30, 2015 – Jan 3, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: evdev - Avoid duplicate checking of empty SYN_REPORT

Input core already drops empty syn_report event so there is no need to check again for dropping empty syn_report event in evdev handler for all clients on every new event.

---
 drivers/input/evdev.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/input/evdev.c +1 -6
index e9ae3d5..6e242b7 100644
@@ -276,13 +276,8 @@ static void evdev_pass_values(struct evdev_client *client,
 		if (__evdev_is_filtered(client, v->type, v->code))
 			continue;
 
-		if (v->type == EV_SYN && v->code == SYN_REPORT) {
-			/* drop empty SYN_REPORT */
-			if (client->packet_head == client->head)
-				continue;
-
+		if (v->type == EV_SYN && v->code == SYN_REPORT)
 			wakeup = true;
-		}
 
 		event.type = v->type;
 		event.code = v->code;
Signature · 1 line
2.6.2
maintainer
#1 lore raw

Hi Aniroop,

Quoted 3 lines · Aniroop Mathur

Input core already drops empty syn_report event so there is no need to check again for dropping empty syn_report event in evdev handler for all clients on every new event.

This reasoning is flawed: if all events from the packet are filtered out for the given client we should be suppressing EV_SYN/SYN_REPORT pair as well.

Thanks.

Quoted 28 lines
---
 drivers/input/evdev.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/input/evdev.c +1 -6
index e9ae3d5..6e242b7 100644
@@ -276,13 +276,8 @@ static void evdev_pass_values(struct evdev_client *client,
 		if (__evdev_is_filtered(client, v->type, v->code))
 			continue;
 
-		if (v->type == EV_SYN && v->code == SYN_REPORT) {
-			/* drop empty SYN_REPORT */
-			if (client->packet_head == client->head)
-				continue;
-
+		if (v->type == EV_SYN && v->code == SYN_REPORT)
 			wakeup = true;
-		}
 
 		event.type = v->type;
 		event.code = v->code;
Signature · 1 line
2.6.2
Signature · 1 line
Dmitry