Linux Input/HID development
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Shailendra Verma <shailendra.capricorn@gmail.com>
Cc: Jingoo Han <jg1.han@samsung.com>, Ferruh Yigit <fery@cypress.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input:keyboard:samsung-keypad - Fix for correct return type
Date: Tue, 26 May 2015 13:41:33 -0700	[thread overview]
Message-ID: <20150526204133.GA27149@dtor-ws> (raw)
In-Reply-To: <1432573204-2923-1-git-send-email-shailendra.capricorn@gmail.com>

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

      reply	other threads:[~2015-05-26 20:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150526204133.GA27149@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=fery@cypress.com \
    --cc=jg1.han@samsung.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=shailendra.capricorn@gmail.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox