All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: Sachin Sant <sachinp@in.ibm.com>
Cc: linux-s390@vger.kernel.org,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org,
	Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: Re: next Jan 6: drivers/s390/char/defkeymap build break
Date: Wed, 06 Jan 2010 10:14:48 -0600	[thread overview]
Message-ID: <4B44B6F8.9070209@windriver.com> (raw)
In-Reply-To: <4B445470.8010402@in.ibm.com>

[-- 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 */

  reply	other threads:[~2010-01-06 16:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-06  7:03 linux-next: Tree for January 6 Stephen Rothwell
2010-01-06  9:14 ` next Jan 6: drivers/s390/char/defkeymap build break Sachin Sant
2010-01-06 16:14   ` Jason Wessel [this message]
2010-01-07  6:03     ` Sachin Sant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B44B6F8.9070209@windriver.com \
    --to=jason.wessel@windriver.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=sachinp@in.ibm.com \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.