lkml.org 
[lkml]   [2006]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/11] restore amikbd compatibility with 2.4
Hi,

On Wed, 24 May 2006, Andrew Morton wrote:

> zippel@linux-m68k.org wrote:
> >
> > + for (i = 0; i < MAX_NR_KEYMAPS; i++) {
> > + static u_short temp_map[NR_KEYS] __initdata;
> > + if (!key_maps[i])
> > + continue;
> > + memset(temp_map, 0, sizeof(temp_map));
> > + for (j = 0; j < 0x78; j++) {
> > + if (!amikbd_keycode[j])
> > + continue;
> > + temp_map[j] = key_maps[i][amikbd_keycode[j]];
> > + }
> > + for (j = 0; j < NR_KEYS; j++) {
> > + if (!temp_map[j])
> > + temp_map[j] = 0xf200;
> > + }
> > + memcpy(key_maps[i], temp_map, sizeof(temp_map));
> > + }
>
> I assume temp_map[] is static to avoid using too much stack.

Yes, although it should only be 1KB.

> But wouldn't it be simpler to make this code operate on key_maps[i] directly?

No, the remapping would overwrite data which still needs to be read.

bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-25 03:53    [W:0.199 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site