linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Gustavo A. R. Silva" <garsilva@embeddedor.com>
Subject: Re: [PATCH] Input: appletouch - use true and false for boolean values
Date: Wed, 14 Mar 2018 10:09:15 -0700	[thread overview]
Message-ID: <20180314170915.GA126464@dtor-ws> (raw)
In-Reply-To: <20180306000043.GA1603@embeddedgus>

On Mon, Mar 05, 2018 at 06:00:43PM -0600, Gustavo A. R. Silva wrote:
> Assign true or false to boolean variables instead of an integer value.
> 
> This issue was detected with the help of Coccinelle.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Applied, thank you.

> ---
>  drivers/input/mouse/appletouch.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
> index 81a695d..032d279 100644
> --- a/drivers/input/mouse/appletouch.c
> +++ b/drivers/input/mouse/appletouch.c
> @@ -587,7 +587,7 @@ static void atp_complete_geyser_1_2(struct urb *urb)
>  		/* Perform size detection, if not done already */
>  		if (unlikely(!dev->size_detect_done)) {
>  			atp_detect_size(dev);
> -			dev->size_detect_done = 1;
> +			dev->size_detect_done = true;
>  			goto exit;
>  		}
>  	}
> @@ -813,7 +813,7 @@ static int atp_open(struct input_dev *input)
>  	if (usb_submit_urb(dev->urb, GFP_ATOMIC))
>  		return -EIO;
>  
> -	dev->open = 1;
> +	dev->open = true;
>  	return 0;
>  }
>  
> @@ -823,7 +823,7 @@ static void atp_close(struct input_dev *input)
>  
>  	usb_kill_urb(dev->urb);
>  	cancel_work_sync(&dev->work);
> -	dev->open = 0;
> +	dev->open = false;
>  }
>  
>  static int atp_handle_geyser(struct atp *dev)
> -- 
> 2.7.4
> 

-- 
Dmitry

      reply	other threads:[~2018-03-14 17:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06  0:00 [PATCH] Input: appletouch - use true and false for boolean values Gustavo A. R. Silva
2018-03-14 17:09 ` 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=20180314170915.GA126464@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=garsilva@embeddedor.com \
    --cc=gustavo@embeddedor.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).