linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] HID: wacom: Don't clear bits unintentionally
@ 2016-11-10 19:25 Dan Carpenter
  2016-11-14 18:31 ` Jason Gerecke
  2016-11-15 11:13 ` Jiri Kosina
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-11-10 19:25 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Benjamin Tissoires, Henrik Rydberg, linux-input, linux-kernel,
	kernel-janitors

This is trying to clear the lower 32 bits but the type is wrong so it
clears everything.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index 0723ba8..1cf4608 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -1765,7 +1765,7 @@ static int wacom_wac_pen_event(struct hid_device *hdev, struct hid_field *field,
 		wacom_wac->hid_data.tipswitch |= value;
 		return 0;
 	case HID_DG_TOOLSERIALNUMBER:
-		wacom_wac->serial[0] = (wacom_wac->serial[0] & ~0xFFFFFFFF);
+		wacom_wac->serial[0] = (wacom_wac->serial[0] & ~0xFFFFFFFFULL);
 		wacom_wac->serial[0] |= value;
 		return 0;
 	case WACOM_HID_WD_SENSE:

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

* Re: [patch] HID: wacom: Don't clear bits unintentionally
  2016-11-10 19:25 [patch] HID: wacom: Don't clear bits unintentionally Dan Carpenter
@ 2016-11-14 18:31 ` Jason Gerecke
  2016-11-15 11:13 ` Jiri Kosina
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gerecke @ 2016-11-14 18:31 UTC (permalink / raw)
  To: Dan Carpenter, Jiri Kosina
  Cc: Benjamin Tissoires, Henrik Rydberg, linux-input, linux-kernel,
	kernel-janitors

On 11/10/2016 11:25 AM, Dan Carpenter wrote:
> This is trying to clear the lower 32 bits but the type is wrong so it
> clears everything.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 

Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>

Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one /
(That is to say, eight) to the two, /
But you can’t take seven from three, /
So you look at the sixty-fours....

> diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
> index 0723ba8..1cf4608 100644
> --- a/drivers/hid/wacom_wac.c
> +++ b/drivers/hid/wacom_wac.c
> @@ -1765,7 +1765,7 @@ static int wacom_wac_pen_event(struct hid_device *hdev, struct hid_field *field,
>  		wacom_wac->hid_data.tipswitch |= value;
>  		return 0;
>  	case HID_DG_TOOLSERIALNUMBER:
> -		wacom_wac->serial[0] = (wacom_wac->serial[0] & ~0xFFFFFFFF);
> +		wacom_wac->serial[0] = (wacom_wac->serial[0] & ~0xFFFFFFFFULL);
>  		wacom_wac->serial[0] |= value;
>  		return 0;
>  	case WACOM_HID_WD_SENSE:
> --

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

* Re: [patch] HID: wacom: Don't clear bits unintentionally
  2016-11-10 19:25 [patch] HID: wacom: Don't clear bits unintentionally Dan Carpenter
  2016-11-14 18:31 ` Jason Gerecke
@ 2016-11-15 11:13 ` Jiri Kosina
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2016-11-15 11:13 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Benjamin Tissoires, Henrik Rydberg, linux-input, linux-kernel,
	kernel-janitors

On Thu, 10 Nov 2016, Dan Carpenter wrote:

> This is trying to clear the lower 32 bits but the type is wrong so it
> clears everything.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied to for-4.10/wacom/mobile-studio-pro. Thanks,

-- 
Jiri Kosina
SUSE Labs

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

end of thread, other threads:[~2016-11-15 11:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-10 19:25 [patch] HID: wacom: Don't clear bits unintentionally Dan Carpenter
2016-11-14 18:31 ` Jason Gerecke
2016-11-15 11:13 ` Jiri Kosina

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