Re: [PATCH v2] Keyboard: omap-keypad: use matrix_keypad.h
Hello, On Sat, 18 Dec 2010, Janusz Krzysztofik wrote: Most keypad drivers make use of the linux/input/matrix_keypad.h defined macros, structures and inline functions. Convert omap-keypad driver to use those as well, as suggested by a compile time warning, hardcoded into the OMAP palt/keypad.h. Created against linux-2.6.37-rc5. Tested on Amstrad Delta. Compile tested with omap1_defconfig and omap2plus_defconfig shrinked to board-h4. Signed-off-by: Janusz Krzysztofik jkrzy...@tis.icnet.pl [...] --- linux-2.6.37-rc5/arch/arm/mach-omap1/board-ams-delta.c.orig 2010-12-09 23:07:35.0 +0100 +++ linux-2.6.37-rc5/arch/arm/mach-omap1/board-ams-delta.c 2010-12-18 16:23:29.0 +0100 @@ -46,81 +46,79 @@ static u16 ams_delta_latch2_reg; static int ams_delta_keymap[] = { [...] +static const struct matrix_keymap_data ams_delta_keymap_data = { + .keymap = ams_delta_keymap, + .keymap_size= ARRAY_SIZE(ams_delta_keymap), +}; You should update the ams_delta_keymap type as well, otherwise this patch will introduce the following sparse warning: CHECK arch/arm/mach-omap1/board-ams-delta.c arch/arm/mach-omap1/board-ams-delta.c:191:27: warning: incorrect type in initializer (different signedness) arch/arm/mach-omap1/board-ams-delta.c:191:27:expected unsigned int const [usertype] *keymap arch/arm/mach-omap1/board-ams-delta.c:191:27:got int static [toplevel] *noident I only checked E3, so other boards should be checked as well. A. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] Keyboard: omap-keypad: use matrix_keypad.h
Monday 20 December 2010 16:29:32 Aaro Koskinen wrote: Hello, On Sat, 18 Dec 2010, Janusz Krzysztofik wrote: Most keypad drivers make use of the linux/input/matrix_keypad.h defined macros, structures and inline functions. Convert omap-keypad driver to use those as well, as suggested by a compile time warning, hardcoded into the OMAP palt/keypad.h. Created against linux-2.6.37-rc5. Tested on Amstrad Delta. Compile tested with omap1_defconfig and omap2plus_defconfig shrinked to board-h4. Signed-off-by: Janusz Krzysztofik jkrzy...@tis.icnet.pl [...] --- linux-2.6.37-rc5/arch/arm/mach-omap1/board-ams-delta.c.orig 2010-12-09 23:07:35.0 +0100 +++ linux-2.6.37-rc5/arch/arm/mach-omap1/board-ams-delta.c 2010-12-18 16:23:29.0 +0100 @@ -46,81 +46,79 @@ static u16 ams_delta_latch2_reg; static int ams_delta_keymap[] = { [...] +static const struct matrix_keymap_data ams_delta_keymap_data = { + .keymap = ams_delta_keymap, + .keymap_size= ARRAY_SIZE(ams_delta_keymap), +}; You should update the ams_delta_keymap type as well, otherwise this patch will introduce the following sparse warning: CHECK arch/arm/mach-omap1/board-ams-delta.c arch/arm/mach-omap1/board-ams-delta.c:191:27: warning: incorrect type in initializer (different signedness) arch/arm/mach-omap1/board-ams-delta.c:191:27:expected unsigned int const [usertype] *keymap arch/arm/mach-omap1/board-ams-delta.c:191:27:got int static [toplevel] *noident Hi Aaro, How did you get this output? I'm using OpenEmbedded as my development environment. Running make with C=1 (EXTRA_OEMAKE= C=1 ) displays a lot but the above. Running sparse by hand breaks with unable to open 'linux/init.h'. Any advice? Thanks, Janusz -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] Keyboard: omap-keypad: use matrix_keypad.h
On Mon, Dec 20, 2010 at 06:32:22PM +0100, Janusz Krzysztofik wrote: Monday 20 December 2010 16:29:32 Aaro Koskinen wrote: Hello, On Sat, 18 Dec 2010, Janusz Krzysztofik wrote: Most keypad drivers make use of the linux/input/matrix_keypad.h defined macros, structures and inline functions. Convert omap-keypad driver to use those as well, as suggested by a compile time warning, hardcoded into the OMAP palt/keypad.h. Created against linux-2.6.37-rc5. Tested on Amstrad Delta. Compile tested with omap1_defconfig and omap2plus_defconfig shrinked to board-h4. Signed-off-by: Janusz Krzysztofik jkrzy...@tis.icnet.pl [...] --- linux-2.6.37-rc5/arch/arm/mach-omap1/board-ams-delta.c.orig 2010-12-09 23:07:35.0 +0100 +++ linux-2.6.37-rc5/arch/arm/mach-omap1/board-ams-delta.c 2010-12-18 16:23:29.0 +0100 @@ -46,81 +46,79 @@ static u16 ams_delta_latch2_reg; static int ams_delta_keymap[] = { [...] +static const struct matrix_keymap_data ams_delta_keymap_data = { + .keymap = ams_delta_keymap, + .keymap_size= ARRAY_SIZE(ams_delta_keymap), +}; You should update the ams_delta_keymap type as well, otherwise this patch will introduce the following sparse warning: CHECK arch/arm/mach-omap1/board-ams-delta.c arch/arm/mach-omap1/board-ams-delta.c:191:27: warning: incorrect type in initializer (different signedness) arch/arm/mach-omap1/board-ams-delta.c:191:27:expected unsigned int const [usertype] *keymap arch/arm/mach-omap1/board-ams-delta.c:191:27:got int static [toplevel] *noident Hi Aaro, How did you get this output? I'm using OpenEmbedded as my development environment. Running make with C=1 (EXTRA_OEMAKE= C=1 ) displays a lot but the above. Running sparse by hand breaks with unable to open 'linux/init.h'. Any advice? Not sure why exactly your sparse does not pick it up (too old maybe?) but the following: --- linux-2.6.37-rc5/arch/arm/mach-omap1/board-ams-delta.c.orig 2010-12-09 23:07:35.0 +0100 +++ linux-2.6.37-rc5/arch/arm/mach-omap1/board-ams-delta.c 2010-12-18 16:23:29.0 +0100 @@ -46,81 +46,79 @@ static u16 ams_delta_latch2_reg; static int ams_delta_keymap[] = { KEY(0, 0, KEY_F1), /* Advert*/ should be static const unisgned int ams_delta_keymap[] = { Same goes for the rest of keymaps. Thanks. -- Dmitry -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] Keyboard: omap-keypad: use matrix_keypad.h
Monday 20 December 2010 19:02:08 Dmitry Torokhov wrote: Not sure why exactly your sparse does not pick it up (too old maybe?) but the following: --- linux-2.6.37-rc5/arch/arm/mach-omap1/board-ams-delta.c.orig 2010-12-09 23:07:35.0 +0100 +++ linux-2.6.37-rc5/arch/arm/mach-omap1/board-ams-delta.c 2010-12-18 16:23:29.0 +0100 @@ -46,81 +46,79 @@ static u16 ams_delta_latch2_reg; static int ams_delta_keymap[] = { KEY(0, 0, KEY_F1), /* Advert*/ should be static const unisgned int ams_delta_keymap[] = { Same goes for the rest of keymaps. Sure, thanks. Janusz -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH v2] Keyboard: omap-keypad: use matrix_keypad.h
Hi, From: Janusz Krzysztofik [jkrzy...@tis.icnet.pl] Monday 20 December 2010 16:29:32 Aaro Koskinen wrote: You should update the ams_delta_keymap type as well, otherwise this patch will introduce the following sparse warning: CHECK arch/arm/mach-omap1/board-ams-delta.c arch/arm/mach-omap1/board-ams-delta.c:191:27: warning: incorrect type in initializer (different signedness) arch/arm/mach-omap1/board-ams-delta.c:191:27:expected unsigned int const [usertype] *keymap arch/arm/mach-omap1/board-ams-delta.c:191:27:got int static [toplevel] *noident Hi Aaro, How did you get this output? I'm using OpenEmbedded as my development environment. Running make with C=1 (EXTRA_OEMAKE= C=1 ) displays a lot but the above. Running sparse by hand breaks with unable to open 'linux/init.h'. Any advice? I'm using the latest sparse from: git://git.kernel.org/pub/scm/devel/sparse/sparse.git I don't know about OpenEmbedded, but I've noticed that at least Debian ships with some old version that is missing many checks... A. -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] Keyboard: omap-keypad: use matrix_keypad.h
Monday 20 December 2010 20:03:58 aaro.koski...@nokia.com wrote: I'm using the latest sparse from: git://git.kernel.org/pub/scm/devel/sparse/sparse.git I don't know about OpenEmbedded, but I've noticed that at least Debian ships with some old version that is missing many checks... Aaro, Both you and Dmitry were right: an old sparse version. Once upgraded from 0.4.1 to 0.4.2 (Gentoo ebuild - OpenEmbedded doesn't build its own sparse binary, but uses a host provided one), now I get that issue reported. No more sparse warnings from me, I hope (until my sparse gets too old again ;). Thanks, Janusz -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html