[PATCH] speakup: fakekey.c: Fix error: macro "__this_cpu_write"requires 2 arguments, but only 1 given

From: Sedat Dilek
Date: Wed Dec 08 2010 - 08:38:31 EST


While building linux-next (next-20101208) I fell over this build failure.
The attached patch is compile-tested-only.

- Sedat -
From 4f25de85d29fa32751c879e645269119a3ef3579 Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@xxxxxxxxx>
Date: Wed, 8 Dec 2010 14:22:49 +0100
Subject: [PATCH] speakup:fakekey.c: Fix error: macro "__this_cpu_write" requires 2 arguments, but only 1 given
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From build.log:

drivers/staging/speakup/fakekey.c:81:38: error: macro "__this_cpu_write" requires 2 arguments, but only 1 given
drivers/staging/speakup/fakekey.c: In function âspeakup_fake_down_arrowâ:
drivers/staging/speakup/fakekey.c:81: error: â__this_cpu_writeâ undeclared (first use in this function)
drivers/staging/speakup/fakekey.c:81: error: (Each undeclared identifier is reported only once
drivers/staging/speakup/fakekey.c:81: error: for each function it appears in.)
drivers/staging/speakup/fakekey.c:81: warning: left-hand operand of comma expression has no effect
drivers/staging/speakup/fakekey.c:81: warning: statement with no effect
drivers/staging/speakup/fakekey.c:81: error: expected â;â before â)â token
drivers/staging/speakup/fakekey.c:81: error: expected statement before â)â token

Issue was introduced by:
commit 6c9bf601b9097f83839baee09b9f3eaa099fc3f4
"drivers: Replace __get_cpu_var with __this_cpu_read if not used for an address."

Signed-off-by: Sedat Dilek <sedat.dilek@xxxxxxxxx>
---
drivers/staging/speakup/fakekey.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/speakup/fakekey.c b/drivers/staging/speakup/fakekey.c
index 9f2a7a1..1b34a87 100644
--- a/drivers/staging/speakup/fakekey.c
+++ b/drivers/staging/speakup/fakekey.c
@@ -78,7 +78,7 @@ void speakup_fake_down_arrow(void)
/* don't change CPU */
preempt_disable();

- __this_cpu_write(reporting_keystroke), true);
+ __this_cpu_write(reporting_keystroke, true);
input_report_key(virt_keyboard, KEY_DOWN, PRESSED);
input_report_key(virt_keyboard, KEY_DOWN, RELEASED);
__this_cpu_write(reporting_keystroke, false);
--
1.7.2.3