Skip to contentSkip to conversation

Staging: speakup: fixed reporting_keystroke variable type

PATCH In review Son P. Nguyen 2 participants 2 messages May 17, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: speakup: fixed reporting_keystroke variable type

From: "Son P. Nguyen" <[email protected]>

Fixed reporting_keystroke type to int instead of bool to quiet sparse complaints of error cannot size expression.

This is a part of eudyptula-challenge.

---
 drivers/staging/speakup/fakekey.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/speakup/fakekey.c +3 -3
index 4299cf4..44ebb36 100644
@@ -28,7 +28,7 @@
 #define PRESSED 1
 #define RELEASED 0
 
-static DEFINE_PER_CPU(bool, reporting_keystroke);
+static DEFINE_PER_CPU(int, reporting_keystroke);
 
 static struct input_dev *virt_keyboard;
 
@@ -78,10 +78,10 @@ void speakup_fake_down_arrow(void)
 	/* don't change CPU */
 	preempt_disable();
 
-	__this_cpu_write(reporting_keystroke, true);
+	__this_cpu_write(reporting_keystroke, 1);
 	input_report_key(virt_keyboard, KEY_DOWN, PRESSED);
 	input_report_key(virt_keyboard, KEY_DOWN, RELEASED);
-	__this_cpu_write(reporting_keystroke, false);
+	__this_cpu_write(reporting_keystroke, 0);
 
 	/* reenable preemption */
 	preempt_enable();
Signature · 1 line
1.8.1.2
#1 lore raw
Quoted 7 lines · Son P. Nguyen

From: "Son P. Nguyen" <[email protected]>

Fixed reporting_keystroke type to int instead of bool to quiet sparse complaints of error cannot size expression.

This is a part of eudyptula-challenge.

This is a bug in Sparse. The original code is correct.

regards,
dan carpenter