From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaro Koskinen Subject: Re: [PATCH v2] Keyboard: omap-keypad: use matrix_keypad.h Date: Mon, 20 Dec 2010 17:29:32 +0200 (EET) Message-ID: References: <201012172332.06480.jkrzyszt@tis.icnet.pl> <20101218060104.GA1623@core.coreip.homeip.net> <201012181639.29820.jkrzyszt@tis.icnet.pl> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Return-path: In-Reply-To: <201012181639.29820.jkrzyszt@tis.icnet.pl> Sender: linux-omap-owner@vger.kernel.org To: Janusz Krzysztofik Cc: Dmitry Torokhov , linux-omap@vger.kernel.org, linux-input@vger.kernel.org, Tony Lindgren , linux-arm-kernel@lists.infradead.org List-Id: linux-input@vger.kernel.org Hello, On Sat, 18 Dec 2010, Janusz Krzysztofik wrote: > Most keypad drivers make use of the > 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 . > > 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 [...] > --- linux-2.6.37-rc5/arch/arm/mach-omap1/board-ams-delta.c.orig 2010-12-09 23:07:35.000000000 +0100 > +++ linux-2.6.37-rc5/arch/arm/mach-omap1/board-ams-delta.c 2010-12-18 16:23:29.000000000 +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] * I only checked E3, so other boards should be checked as well. A. From mboxrd@z Thu Jan 1 00:00:00 1970 From: aaro.koskinen@nokia.com (Aaro Koskinen) Date: Mon, 20 Dec 2010 17:29:32 +0200 (EET) Subject: [PATCH v2] Keyboard: omap-keypad: use matrix_keypad.h In-Reply-To: <201012181639.29820.jkrzyszt@tis.icnet.pl> References: <201012172332.06480.jkrzyszt@tis.icnet.pl> <20101218060104.GA1623@core.coreip.homeip.net> <201012181639.29820.jkrzyszt@tis.icnet.pl> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hello, On Sat, 18 Dec 2010, Janusz Krzysztofik wrote: > Most keypad drivers make use of the > 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 . > > 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 [...] > --- linux-2.6.37-rc5/arch/arm/mach-omap1/board-ams-delta.c.orig 2010-12-09 23:07:35.000000000 +0100 > +++ linux-2.6.37-rc5/arch/arm/mach-omap1/board-ams-delta.c 2010-12-18 16:23:29.000000000 +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] * I only checked E3, so other boards should be checked as well. A.