Thread (7 messages) 7 messages, 3 authors, 2011-09-20

Re: [PATCH v2] Input: gpio_keys - Use of_property_read_u32

flat view

From: Tobias Klauser <tklauser@distanz.ch>
Date: 2011-09-20 12:54:26

Hi Dmitry

On 2011-09-20 at 08:26:04 +0200, Dmitry Torokhov [off-list ref] wrote:
On Tue, Sep 20, 2011 at 11:26:27AM +1000, Stephen Rothwell wrote:
quoted
On Mon, 19 Sep 2011 11:09:51 +0200 Tobias Klauser [off-list ref] wrote:
quoted
Use the of_property_read_u32 helper function to retreive u32 values
from the device tree. Also do not pass the len parameter to
of_get_property if it isn't checked afterwards.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
v2: Fix build failure caused by a missing opening brace (reported by
    Stephen Rothwell)
Sure, but it will still generate all the warnings I reported as "reg" is
the wrong type now.

drivers/input/keyboard/gpio_keys.c: In function 'gpio_keys_get_devtree_pdata':
drivers/input/keyboard/gpio_keys.c:500:3: warning: passing argument 3 of 'of_property_read_u32' from incompatible pointer type
include/linux/of.h:268:19: note: expected 'u32 *' but argument is of type 'const u32 **'
drivers/input/keyboard/gpio_keys.c:504:19: warning: assignment makes integer from pointer without a cast
drivers/input/keyboard/gpio_keys.c:508:3: warning: passing argument 3 of 'of_property_read_u32' from incompatible pointer type
include/linux/of.h:268:19: note: expected 'u32 *' but argument is of type 'const u32 **'
drivers/input/keyboard/gpio_keys.c:509:20: warning: assignment makes integer from pointer without a cast
drivers/input/keyboard/gpio_keys.c:515:3: warning: passing argument 3 of 'of_property_read_u32' from incompatible pointer type
include/linux/of.h:268:19: note: expected 'u32 *' but argument is of type 'const u32 **'
drivers/input/keyboard/gpio_keys.c:516:33: warning: assignment makes integer from pointer without a cast
I think the following shoudl fix it, I am going to fold it into original
path.
Thanks a lot for fixing this and sorry for the messup.

Thanks
Tobias
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help