Skip to contentSkip to conversation

HID: wacom: Don't clear bits unintentionally

PATCH Applied Dan Carpenter 3 participants 3 messages Nov 10, 2016 – Nov 15, 2016

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

PATCH 1/1 HID: wacom: Don't clear bits unintentionally

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

drivers/hid/wacom_wac.c +1 -1
index 0723ba8..1cf4608 100644
@@ -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:
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Dan Carpenter

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

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

Quoted 5 lines
drivers/hid/wacom_wac.c +0 -0
index 0723ba8..1cf4608 100644

drivers/hid/wacom_wac.c static int wacom_wac_pen_event(struct hid_device *hdev, struct hid_field *field,

Quoted 9 lines
drivers/hid/wacom_wac.c +1 -2
@@ -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:
--

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html