linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] HID: rmi: fix some harmless BIT() mistakes
@ 2015-05-14  8:32 Dan Carpenter
  2015-05-14 14:16 ` Benjamin Tissoires
  2015-05-18  9:24 ` Jiri Kosina
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2015-05-14  8:32 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires
  Cc: Henrik Rydberg, linux-input, kernel-janitors, Joe Perches

These defines are used like this:

	if (!(test_bit(RMI_STARTED, &hdata->flags)))

So the intent was to use bits 0, 1 and 2 but because of the extra BIT()
shifts we're actually using 1, 2 and 4.  It's harmless because it's done
consistently but static checkers will complain.

Fixes: 9fb6bf02e3ad ('HID: rmi: introduce RMI driver for Synaptics touchpads')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
index 368ffdf..2f3e51d 100644
--- a/drivers/hid/hid-rmi.c
+++ b/drivers/hid/hid-rmi.c
@@ -29,9 +29,9 @@
 #define RMI_SET_RMI_MODE_REPORT_ID	0x0f /* Feature Report */
 
 /* flags */
-#define RMI_READ_REQUEST_PENDING	BIT(0)
-#define RMI_READ_DATA_PENDING		BIT(1)
-#define RMI_STARTED			BIT(2)
+#define RMI_READ_REQUEST_PENDING	0
+#define RMI_READ_DATA_PENDING		1
+#define RMI_STARTED			2
 
 /* device flags */
 #define RMI_DEVICE			BIT(0)

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

end of thread, other threads:[~2015-05-18  9:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-14  8:32 [patch] HID: rmi: fix some harmless BIT() mistakes Dan Carpenter
2015-05-14 14:16 ` Benjamin Tissoires
2015-05-18  9:24 ` 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).