linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] Input: synaptics-rmi4 - using logical instead of bitwise AND
@ 2016-03-15  7:11 Dan Carpenter
  2016-03-15  8:33 ` Joe Perches
  2016-03-15 21:20 ` Andrew Duggan
  0 siblings, 2 replies; 6+ messages in thread
From: Dan Carpenter @ 2016-03-15  7:11 UTC (permalink / raw)
  To: Dmitry Torokhov, Andrew Duggan
  Cc: Henrik Rydberg, Christopher Heiny, linux-input, linux-kernel,
	kernel-janitors

There is a typo so we have && instead of &.

Fixes: ff8f83708b3e ('Input: synaptics-rmi4 - add support for 2D sensors and F11')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/input/rmi4/rmi_f11.c b/drivers/input/rmi4/rmi_f11.c
index 77a5eb8..ec8a10d 100644
--- a/drivers/input/rmi4/rmi_f11.c
+++ b/drivers/input/rmi4/rmi_f11.c
@@ -775,7 +775,7 @@ static int rmi_f11_get_query_parameters(struct rmi_device *rmi_dev,
 	sensor_query->has_abs = !!(query_buf[0] & RMI_F11_HAS_ABS);
 	sensor_query->has_gestures = !!(query_buf[0] & RMI_F11_HAS_GESTURES);
 	sensor_query->has_sensitivity_adjust =
-		!!(query_buf[0] && RMI_F11_HAS_SENSITIVITY_ADJ);
+		!!(query_buf[0] & RMI_F11_HAS_SENSITIVITY_ADJ);
 	sensor_query->configurable = !!(query_buf[0] & RMI_F11_CONFIGURABLE);
 
 	sensor_query->nr_x_electrodes =
@@ -803,7 +803,7 @@ static int rmi_f11_get_query_parameters(struct rmi_device *rmi_dev,
 		sensor_query->has_bending_correction =
 			!!(query_buf[0] & RMI_F11_HAS_BENDING_CORRECTION);
 		sensor_query->has_large_object_suppression =
-		!!(query_buf[0] && RMI_F11_HAS_LARGE_OBJECT_SUPPRESSION);
+			!!(query_buf[0] & RMI_F11_HAS_LARGE_OBJECT_SUPPRESSION);
 		sensor_query->has_jitter_filter =
 			!!(query_buf[0] & RMI_F11_HAS_JITTER_FILTER);
 		query_size++;

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

* Re: [patch] Input: synaptics-rmi4 - using logical instead of bitwise AND
  2016-03-15  7:11 [patch] Input: synaptics-rmi4 - using logical instead of bitwise AND Dan Carpenter
@ 2016-03-15  8:33 ` Joe Perches
  2016-03-15  8:37   ` Dan Carpenter
  2016-03-15 21:20 ` Andrew Duggan
  1 sibling, 1 reply; 6+ messages in thread
From: Joe Perches @ 2016-03-15  8:33 UTC (permalink / raw)
  To: Dan Carpenter, Dmitry Torokhov, Andrew Duggan
  Cc: Henrik Rydberg, Christopher Heiny, linux-input, linux-kernel,
	kernel-janitors

On Tue, 2016-03-15 at 10:11 +0300, Dan Carpenter wrote:
> There is a typo so we have && instead of &.
> 
> Fixes: ff8f83708b3e ('Input: synaptics-rmi4 - add support for 2D sensors and F11')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/input/rmi4/rmi_f11.c b/drivers/input/rmi4/rmi_f11.c
[]
> @@ -775,7 +775,7 @@ static int rmi_f11_get_query_parameters(struct rmi_device *rmi_dev,
>  	sensor_query->has_abs = !!(query_buf[0] & RMI_F11_HAS_ABS);
>  	sensor_query->has_gestures = !!(query_buf[0] & RMI_F11_HAS_GESTURES);
>  	sensor_query->has_sensitivity_adjust =
> -		!!(query_buf[0] && RMI_F11_HAS_SENSITIVITY_ADJ);
> +		!!(query_buf[0] & RMI_F11_HAS_SENSITIVITY_ADJ);
>  	sensor_query->configurable = !!(query_buf[0] & RMI_F11_CONFIGURABLE);
>  
>  	sensor_query->nr_x_electrodes =
> @@ -803,7 +803,7 @@ static int rmi_f11_get_query_parameters(struct rmi_device *rmi_dev,
>  		sensor_query->has_bending_correction =
>  			!!(query_buf[0] & RMI_F11_HAS_BENDING_CORRECTION);
>  		sensor_query->has_large_object_suppression =
> -		!!(query_buf[0] && RMI_F11_HAS_LARGE_OBJECT_SUPPRESSION);
> +			!!(query_buf[0] & RMI_F11_HAS_LARGE_OBJECT_SUPPRESSION);
>  		sensor_query->has_jitter_filter =
>  			!!(query_buf[0] & RMI_F11_HAS_JITTER_FILTER);
>  		query_size++;

Right and as well these are bool so the !! isn't necessary.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [patch] Input: synaptics-rmi4 - using logical instead of bitwise AND
  2016-03-15  8:33 ` Joe Perches
@ 2016-03-15  8:37   ` Dan Carpenter
  2016-03-15  8:54     ` Joe Perches
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2016-03-15  8:37 UTC (permalink / raw)
  To: Joe Perches
  Cc: Dmitry Torokhov, Andrew Duggan, Henrik Rydberg, Christopher Heiny,
	linux-input, linux-kernel, kernel-janitors

On Tue, Mar 15, 2016 at 01:33:29AM -0700, Joe Perches wrote:
> Right and as well these are bool so the !! isn't necessary.

Not necessary but nice for reading...

regards,
dan carpenter

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

* Re: [patch] Input: synaptics-rmi4 - using logical instead of bitwise AND
  2016-03-15  8:37   ` Dan Carpenter
@ 2016-03-15  8:54     ` Joe Perches
  0 siblings, 0 replies; 6+ messages in thread
From: Joe Perches @ 2016-03-15  8:54 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Dmitry Torokhov, Andrew Duggan, Henrik Rydberg, Christopher Heiny,
	linux-input, linux-kernel, kernel-janitors

On Tue, 2016-03-15 at 11:37 +0300, Dan Carpenter wrote:
> On Tue, Mar 15, 2016 at 01:33:29AM -0700, Joe Perches wrote:
> > 
> > Right and as well these are bool so the !! isn't necessary.
> Not necessary but nice for reading...

<shrug> opinions vary.

cheers, Joe


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

* Re: [patch] Input: synaptics-rmi4 - using logical instead of bitwise AND
  2016-03-15  7:11 [patch] Input: synaptics-rmi4 - using logical instead of bitwise AND Dan Carpenter
  2016-03-15  8:33 ` Joe Perches
@ 2016-03-15 21:20 ` Andrew Duggan
  2016-03-15 23:45   ` Dmitry Torokhov
  1 sibling, 1 reply; 6+ messages in thread
From: Andrew Duggan @ 2016-03-15 21:20 UTC (permalink / raw)
  To: Dan Carpenter, Dmitry Torokhov
  Cc: Henrik Rydberg, Christopher Heiny, linux-input, linux-kernel,
	kernel-janitors

On 03/15/2016 12:11 AM, Dan Carpenter wrote:
> There is a typo so we have && instead of &.
>
> Fixes: ff8f83708b3e ('Input: synaptics-rmi4 - add support for 2D sensors and F11')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Andrew Duggan <aduggan@synaptics.com>

> diff --git a/drivers/input/rmi4/rmi_f11.c b/drivers/input/rmi4/rmi_f11.c
> index 77a5eb8..ec8a10d 100644
> --- a/drivers/input/rmi4/rmi_f11.c
> +++ b/drivers/input/rmi4/rmi_f11.c
> @@ -775,7 +775,7 @@ static int rmi_f11_get_query_parameters(struct rmi_device *rmi_dev,
>   	sensor_query->has_abs = !!(query_buf[0] & RMI_F11_HAS_ABS);
>   	sensor_query->has_gestures = !!(query_buf[0] & RMI_F11_HAS_GESTURES);
>   	sensor_query->has_sensitivity_adjust =
> -		!!(query_buf[0] && RMI_F11_HAS_SENSITIVITY_ADJ);
> +		!!(query_buf[0] & RMI_F11_HAS_SENSITIVITY_ADJ);
>   	sensor_query->configurable = !!(query_buf[0] & RMI_F11_CONFIGURABLE);
>   
>   	sensor_query->nr_x_electrodes =
> @@ -803,7 +803,7 @@ static int rmi_f11_get_query_parameters(struct rmi_device *rmi_dev,
>   		sensor_query->has_bending_correction =
>   			!!(query_buf[0] & RMI_F11_HAS_BENDING_CORRECTION);
>   		sensor_query->has_large_object_suppression =
> -		!!(query_buf[0] && RMI_F11_HAS_LARGE_OBJECT_SUPPRESSION);
> +			!!(query_buf[0] & RMI_F11_HAS_LARGE_OBJECT_SUPPRESSION);
>   		sensor_query->has_jitter_filter =
>   			!!(query_buf[0] & RMI_F11_HAS_JITTER_FILTER);
>   		query_size++;


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

* Re: [patch] Input: synaptics-rmi4 - using logical instead of bitwise AND
  2016-03-15 21:20 ` Andrew Duggan
@ 2016-03-15 23:45   ` Dmitry Torokhov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Torokhov @ 2016-03-15 23:45 UTC (permalink / raw)
  To: Andrew Duggan
  Cc: Dan Carpenter, Henrik Rydberg, Christopher Heiny, linux-input,
	linux-kernel, kernel-janitors

On Tue, Mar 15, 2016 at 02:20:02PM -0700, Andrew Duggan wrote:
> On 03/15/2016 12:11 AM, Dan Carpenter wrote:
> >There is a typo so we have && instead of &.
> >
> >Fixes: ff8f83708b3e ('Input: synaptics-rmi4 - add support for 2D sensors and F11')
> >Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> Acked-by: Andrew Duggan <aduggan@synaptics.com>

Applied, thank you.

> 
> >diff --git a/drivers/input/rmi4/rmi_f11.c b/drivers/input/rmi4/rmi_f11.c
> >index 77a5eb8..ec8a10d 100644
> >--- a/drivers/input/rmi4/rmi_f11.c
> >+++ b/drivers/input/rmi4/rmi_f11.c
> >@@ -775,7 +775,7 @@ static int rmi_f11_get_query_parameters(struct rmi_device *rmi_dev,
> >  	sensor_query->has_abs = !!(query_buf[0] & RMI_F11_HAS_ABS);
> >  	sensor_query->has_gestures = !!(query_buf[0] & RMI_F11_HAS_GESTURES);
> >  	sensor_query->has_sensitivity_adjust =
> >-		!!(query_buf[0] && RMI_F11_HAS_SENSITIVITY_ADJ);
> >+		!!(query_buf[0] & RMI_F11_HAS_SENSITIVITY_ADJ);
> >  	sensor_query->configurable = !!(query_buf[0] & RMI_F11_CONFIGURABLE);
> >  	sensor_query->nr_x_electrodes =
> >@@ -803,7 +803,7 @@ static int rmi_f11_get_query_parameters(struct rmi_device *rmi_dev,
> >  		sensor_query->has_bending_correction =
> >  			!!(query_buf[0] & RMI_F11_HAS_BENDING_CORRECTION);
> >  		sensor_query->has_large_object_suppression =
> >-		!!(query_buf[0] && RMI_F11_HAS_LARGE_OBJECT_SUPPRESSION);
> >+			!!(query_buf[0] & RMI_F11_HAS_LARGE_OBJECT_SUPPRESSION);
> >  		sensor_query->has_jitter_filter =
> >  			!!(query_buf[0] & RMI_F11_HAS_JITTER_FILTER);
> >  		query_size++;
> 

-- 
Dmitry

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

end of thread, other threads:[~2016-03-15 23:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-15  7:11 [patch] Input: synaptics-rmi4 - using logical instead of bitwise AND Dan Carpenter
2016-03-15  8:33 ` Joe Perches
2016-03-15  8:37   ` Dan Carpenter
2016-03-15  8:54     ` Joe Perches
2016-03-15 21:20 ` Andrew Duggan
2016-03-15 23:45   ` 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).