* [PATCH] Input:keyboard:samsung-keypad - Fix for correct return type
@ 2015-05-25 17:00 Shailendra Verma
2015-05-26 20:41 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Shailendra Verma @ 2015-05-25 17:00 UTC (permalink / raw)
To: Dmitry Torokhov, Jingoo Han, Ferruh Yigit, Rafael J. Wysocki,
Wolfram Sang, linux-input
Cc: linux-kernel, Shailendra Verma
The return type of the function samsung_keypad_report() is bool but we are
returning the unsigned int value.So changing the unsigned int to bool type
and initializing with false.
Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com>
---
drivers/input/keyboard/samsung-keypad.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c
index 6b9fdf6..44b1ba9 100644
--- a/drivers/input/keyboard/samsung-keypad.c
+++ b/drivers/input/keyboard/samsung-keypad.c
@@ -112,7 +112,7 @@ static bool samsung_keypad_report(struct samsung_keypad *keypad,
struct input_dev *input_dev = keypad->input_dev;
unsigned int changed;
unsigned int pressed;
- unsigned int key_down = 0;
+ bool key_down = false;
unsigned int val;
unsigned int col, row;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Input:keyboard:samsung-keypad - Fix for correct return type
2015-05-25 17:00 [PATCH] Input:keyboard:samsung-keypad - Fix for correct return type Shailendra Verma
@ 2015-05-26 20:41 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2015-05-26 20:41 UTC (permalink / raw)
To: Shailendra Verma
Cc: Jingoo Han, Ferruh Yigit, Rafael J. Wysocki, Wolfram Sang,
linux-input, linux-kernel
On Mon, May 25, 2015 at 10:30:04PM +0530, Shailendra Verma wrote:
> The return type of the function samsung_keypad_report() is bool but we are
> returning the unsigned int value.So changing the unsigned int to bool type
> and initializing with false.
>
> Signed-off-by: Shailendra Verma <shailendra.capricorn@gmail.com>
> ---
> drivers/input/keyboard/samsung-keypad.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c
> index 6b9fdf6..44b1ba9 100644
> --- a/drivers/input/keyboard/samsung-keypad.c
> +++ b/drivers/input/keyboard/samsung-keypad.c
> @@ -112,7 +112,7 @@ static bool samsung_keypad_report(struct samsung_keypad *keypad,
> struct input_dev *input_dev = keypad->input_dev;
> unsigned int changed;
> unsigned int pressed;
> - unsigned int key_down = 0;
> + bool key_down = false;
No, this causes conversion bool->unsigned int->bool on every iteration
of the loop.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-26 20:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-25 17:00 [PATCH] Input:keyboard:samsung-keypad - Fix for correct return type Shailendra Verma
2015-05-26 20:41 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).