Bluetooth: Fix sparse warning from HID new leds handling
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 30 Jul 2014 06:08:45 +0000 (08:08 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 30 Jul 2014 17:28:41 +0000 (19:28 +0200)
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>
net/bluetooth/hidp/core.c

index 8181ea4bc2f236f3755e515782bb7cff2b86ff6f..6c7ecf116e74ba5e4b3a88ab7c71a5f632563577 100644 (file)
@@ -154,7 +154,7 @@ static int hidp_input_event(struct input_dev *dev, unsigned int type,
                  (!!test_bit(LED_COMPOSE, dev->led) << 3) |
                  (!!test_bit(LED_SCROLLL, dev->led) << 2) |
                  (!!test_bit(LED_CAPSL,   dev->led) << 1) |
-                 (!!test_bit(LED_NUML,    dev->led));
+                 (!!test_bit(LED_NUML,    dev->led) << 0);
 
        if (session->leds == newleds)
                return 0;