* next Jan 6: drivers/s390/char/defkeymap build break
[not found] <20100106180342.43844983.sfr@canb.auug.org.au>
@ 2010-01-06 9:14 ` Sachin Sant
2010-01-06 16:14 ` Jason Wessel
0 siblings, 1 reply; 3+ messages in thread
From: Sachin Sant @ 2010-01-06 9:14 UTC (permalink / raw)
To: linux-s390; +Cc: Stephen Rothwell, linux-next, Heiko Carstens, jason.wessel
Today's next fails to build on s390 with
CC drivers/s390/char/defkeymap.o
drivers/s390/char/defkeymap.c:30: error: static declaration of 'shift_map' follows non-static declaration
include/linux/keyboard.h:31: error: previous declaration of 'shift_map' was here
drivers/s390/char/defkeymap.c:49: error: static declaration of 'ctrl_map' follows non-static declaration
include/linux/keyboard.h:32: error: previous declaration of 'ctrl_map' was here
make[2]: *** [drivers/s390/char/defkeymap.o] Error 1
make[1]: *** [drivers/s390/char] Error 2
Probable cause could be commit 91570de..
kgdboc,keyboard: Keyboard driver for kdb with kgdb
Thanks
-Sachin
--
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: next Jan 6: drivers/s390/char/defkeymap build break
2010-01-06 9:14 ` next Jan 6: drivers/s390/char/defkeymap build break Sachin Sant
@ 2010-01-06 16:14 ` Jason Wessel
2010-01-07 6:03 ` Sachin Sant
0 siblings, 1 reply; 3+ messages in thread
From: Jason Wessel @ 2010-01-06 16:14 UTC (permalink / raw)
To: Sachin Sant; +Cc: linux-s390, Stephen Rothwell, linux-next, Heiko Carstens
[-- Attachment #1: Type: text/plain, Size: 1268 bytes --]
Sachin Sant wrote:
> Today's next fails to build on s390 with
>
> CC drivers/s390/char/defkeymap.o
> drivers/s390/char/defkeymap.c:30: error: static declaration of 'shift_map' follows non-static declaration
> include/linux/keyboard.h:31: error: previous declaration of 'shift_map' was here
> drivers/s390/char/defkeymap.c:49: error: static declaration of 'ctrl_map' follows non-static declaration
> include/linux/keyboard.h:32: error: previous declaration of 'ctrl_map' was here
> make[2]: *** [drivers/s390/char/defkeymap.o] Error 1
> make[1]: *** [drivers/s390/char] Error 2
>
> Probable cause could be commit 91570de..
> kgdboc,keyboard: Keyboard driver for kdb with kgdb
>
> Thanks
> -Sachin
>
>
I had patched the include/linux/keyboard.h originally to expose the
definition which was already a global symbol. It turns out the
kdb_keyboard.c implementation should not be accessing shift_map[]
directly. It is accessed through a pointer to the data found in key_maps[].
I folded in a change to this patch to not modify
include/linux/keyboard.h and to fix the kdb keyboard code to use key_maps[].
Hopefully that fixes the problem. Attached is the folded patch, which
reverts include/linux/keyboard.h to be unmodified by the kdb series.
Thanks,
Jason.
[-- Attachment #2: keymap_kdb_keyboard.patch --]
[-- Type: text/x-diff, Size: 1035 bytes --]
diff -u b/drivers/char/kdb_keyboard.c b/drivers/char/kdb_keyboard.c
--- b/drivers/char/kdb_keyboard.c
+++ b/drivers/char/kdb_keyboard.c
@@ -145,10 +145,10 @@
if (!shift_lock && !shift_key && !ctrl_key) {
keychar = plain_map[scancode];
- } else if (shift_lock || shift_key) {
- keychar = shift_map[scancode];
- } else if (ctrl_key) {
- keychar = ctrl_map[scancode];
+ } else if ((shift_lock || shift_key) && key_maps[1]) {
+ keychar = key_maps[1][scancode];
+ } else if (ctrl_key && key_maps[4]) {
+ keychar = key_maps[4][scancode];
} else {
keychar = 0x0020;
kdb_printf("Unknown state/scancode (%d)\n", scancode);
reverted:
--- b/include/linux/keyboard.h
+++ a/include/linux/keyboard.h
@@ -28,8 +28,6 @@
extern const int max_vals[];
extern unsigned short *key_maps[MAX_NR_KEYMAPS];
extern unsigned short plain_map[NR_KEYS];
-extern unsigned short shift_map[NR_KEYS];
-extern unsigned short ctrl_map[NR_KEYS];
struct keyboard_notifier_param {
struct vc_data *vc; /* VC on which the keyboard press was done */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: next Jan 6: drivers/s390/char/defkeymap build break
2010-01-06 16:14 ` Jason Wessel
@ 2010-01-07 6:03 ` Sachin Sant
0 siblings, 0 replies; 3+ messages in thread
From: Sachin Sant @ 2010-01-07 6:03 UTC (permalink / raw)
To: Jason Wessel; +Cc: linux-s390, Stephen Rothwell, linux-next, Heiko Carstens
Jason Wessel wrote:
> Sachin Sant wrote:
>
>> Today's next fails to build on s390 with
>>
>> CC drivers/s390/char/defkeymap.o
>> drivers/s390/char/defkeymap.c:30: error: static declaration of 'shift_map' follows non-static declaration
>> include/linux/keyboard.h:31: error: previous declaration of 'shift_map' was here
>> drivers/s390/char/defkeymap.c:49: error: static declaration of 'ctrl_map' follows non-static declaration
>> include/linux/keyboard.h:32: error: previous declaration of 'ctrl_map' was here
>> make[2]: *** [drivers/s390/char/defkeymap.o] Error 1
>> make[1]: *** [drivers/s390/char] Error 2
>>
>> Probable cause could be commit 91570de..
>> kgdboc,keyboard: Keyboard driver for kdb with kgdb
>>
>> Thanks
>> -Sachin
>>
>>
>>
> I had patched the include/linux/keyboard.h originally to expose the
> definition which was already a global symbol. It turns out the
> kdb_keyboard.c implementation should not be accessing shift_map[]
> directly. It is accessed through a pointer to the data found in key_maps[].
>
> I folded in a change to this patch to not modify
> include/linux/keyboard.h and to fix the kdb keyboard code to use key_maps[].
>
> Hopefully that fixes the problem. Attached is the folded patch, which
> reverts include/linux/keyboard.h to be unmodified by the kdb series.
>
Yup that works. Thanks
--
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-07 6:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20100106180342.43844983.sfr@canb.auug.org.au>
2010-01-06 9:14 ` next Jan 6: drivers/s390/char/defkeymap build break Sachin Sant
2010-01-06 16:14 ` Jason Wessel
2010-01-07 6:03 ` Sachin Sant
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox