Skip to content

Commit bdb9434

Browse files
committed
Bluetooth: Fix sparse warning from HID new leds handling
The new leds bit handling produces this spares warning. CHECK net/bluetooth/hidp/core.c net/bluetooth/hidp/core.c:156:60: warning: dubious: x | !y Just fix it by doing an explicit x << 0 shift operation. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
1 parent 6f78fd4 commit bdb9434

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/bluetooth/hidp/core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static int hidp_input_event(struct input_dev *dev, unsigned int type,
154154
(!!test_bit(LED_COMPOSE, dev->led) << 3) |
155155
(!!test_bit(LED_SCROLLL, dev->led) << 2) |
156156
(!!test_bit(LED_CAPSL, dev->led) << 1) |
157-
(!!test_bit(LED_NUML, dev->led));
157+
(!!test_bit(LED_NUML, dev->led) << 0);
158158

159159
if (session->leds == newleds)
160160
return 0;

0 commit comments

Comments
 (0)