Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1522000 > unrolled thread

Re: [patch] HID: wacom: Don't clear bits unintentionally

Started byJason Gerecke <killertofu@gmail.com>
First post2016-11-14 19:40 +0100
Last post2016-11-14 19:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [patch] HID: wacom: Don't clear bits unintentionally Jason Gerecke <killertofu@gmail.com> - 2016-11-14 19:40 +0100

#1522000 — Re: [patch] HID: wacom: Don't clear bits unintentionally

FromJason Gerecke <killertofu@gmail.com>
Date2016-11-14 19:40 +0100
SubjectRe: [patch] HID: wacom: Don't clear bits unintentionally
Message-ID<sDukH-2cH-65@gated-at.bofh.it>
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:
> --

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web