linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: evdev - Avoid duplicate checking of empty SYN_REPORT
@ 2015-12-30 23:25 Aniroop Mathur
  2016-01-03  4:31 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Aniroop Mathur @ 2015-12-30 23:25 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: linux-input, linux-kernel, aniroop.mathur, 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.

Signed-off-by: Aniroop Mathur <a.mathur@samsung.com>
---
 drivers/input/evdev.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index e9ae3d5..6e242b7 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -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;
-- 
2.6.2


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

* Re: [PATCH] Input: evdev - Avoid duplicate checking of empty SYN_REPORT
  2015-12-30 23:25 [PATCH] Input: evdev - Avoid duplicate checking of empty SYN_REPORT Aniroop Mathur
@ 2016-01-03  4:31 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2016-01-03  4:31 UTC (permalink / raw)
  To: Aniroop Mathur; +Cc: linux-input, linux-kernel, aniroop.mathur

Hi Aniroop,

On Thu, Dec 31, 2015 at 04:55:58AM +0530, Aniroop Mathur wrote:
> 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.

> 
> Signed-off-by: Aniroop Mathur <a.mathur@samsung.com>
> ---
>  drivers/input/evdev.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
> index e9ae3d5..6e242b7 100644
> --- a/drivers/input/evdev.c
> +++ b/drivers/input/evdev.c
> @@ -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;
> -- 
> 2.6.2
> 

-- 
Dmitry

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

end of thread, other threads:[~2016-01-03  4:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-30 23:25 [PATCH] Input: evdev - Avoid duplicate checking of empty SYN_REPORT Aniroop Mathur
2016-01-03  4:31 ` Dmitry Torokhov

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