Skip to contentSkip to conversation

drivers: staging: speakup: fix sparse "warning: expression using sizeof bool"

PATCH In review Witos 2 participants 2 messages Mar 27, 2015 – Apr 3, 2015 Staging

lore
Share & tools
lore

Witos

author
#0 lore raw

PATCH 1/1 drivers: staging: speakup: fix sparse "warning: expression using sizeof bool"

Changed bool to u8.

---
 drivers/staging/speakup/fakekey.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/speakup/fakekey.c +1 -1
index 4299cf4..3dfb6bd 100644
@@ -28,7 +28,7 @@
 #define PRESSED 1
 #define RELEASED 0
 
-static DEFINE_PER_CPU(bool, reporting_keystroke);
+static DEFINE_PER_CPU(u8, reporting_keystroke);
 
 static struct input_dev *virt_keyboard;
 
Signature · 1 line
2.0.5
#1 lore raw
Quoted 3 lines · Witos

Changed bool to u8.

Your From: email line and signed-off-by: line names do not match, so I can't take this patch :(

Please fix up and resend.

Quoted 9 lines
---
 drivers/staging/speakup/fakekey.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/speakup/fakekey.c +0 -0
index 4299cf4..3dfb6bd 100644

drivers/staging/speakup/fakekey.c line 31

Quoted 5 lines
drivers/staging/speakup/fakekey.c +1 -1
@@ -28,7 +28,7 @@
 #define PRESSED 1
 #define RELEASED 0
 
-static DEFINE_PER_CPU(bool, reporting_keystroke);
+static DEFINE_PER_CPU(u8, reporting_keystroke);

What is this fixing? Why can't we have a bool as a per-cpu variable? We are only writing true or false to it.

thanks,

greg k-h