public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Steven Joruk <steven@joruk.com>
Cc: michael.hennerich@analog.com, linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: adxl34x - avoid int-in-bool-context warning
Date: Wed, 20 Sep 2017 12:13:39 -0700	[thread overview]
Message-ID: <20170920191339.GB6770@dtor-ws> (raw)
In-Reply-To: <20170918154357.2949-1-steven@joruk.com>

On Mon, Sep 18, 2017 at 04:43:57PM +0100, Steven Joruk wrote:
> The code is fine, but make it clear to the compiler.
> 
> drivers/input/misc/adxl34x.c:134:35: warning: ‘<<’ in boolean context
> 
> Signed-off-by: Steven Joruk <steven@joruk.com>
> ---
>  drivers/input/misc/adxl34x.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c
> index 2b2d02f408bb..e0caaa0de454 100644
> --- a/drivers/input/misc/adxl34x.c
> +++ b/drivers/input/misc/adxl34x.c
> @@ -796,7 +796,7 @@ struct adxl34x *adxl34x_probe(struct device *dev, int irq,
>  
>  	if (pdata->watermark) {
>  		ac->int_mask |= WATERMARK;
> -		if (!FIFO_MODE(pdata->fifo_mode))
> +		if (FIFO_MODE(pdata->fifo_mode) == 0)

This has been NAKed before:

https://www.spinics.net/lists/linux-ide/msg54485.html

I'll pick up the V2 from Arnd that is better.

>  			ac->pdata.fifo_mode |= FIFO_STREAM;
>  	} else {
>  		ac->int_mask |= DATA_READY;
> -- 
> 2.14.1
> 

Thanks.

-- 
Dmitry

      reply	other threads:[~2017-09-20 19:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18 15:43 [PATCH] Input: adxl34x - avoid int-in-bool-context warning Steven Joruk
2017-09-20 19:13 ` 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=20170920191339.GB6770@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=steven@joruk.com \
    /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