linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: "Linux Media Mailing List" <linux-media@vger.kernel.org>,
	"Mauro Carvalho Chehab" <mchehab@infradead.org>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Pavel Machek" <pavel@ucw.cz>,
	"Pali Rohár" <pali.rohar@gmail.com>
Subject: Re: [PATCH] [media] ad5820: fix one smatch warning
Date: Wed, 24 Aug 2016 14:46:44 +0300	[thread overview]
Message-ID: <57BD8924.9000405@linux.intel.com> (raw)
In-Reply-To: <1ee6dd5a918bd98dea20a2847f1ca15964dca952.1472037792.git.mchehab@s-opensource.com>

Hi Mauro,

Mauro Carvalho Chehab wrote:
> drivers/media/i2c/ad5820.c:61:24: error: dubious one-bit signed bitfield
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> ---
>  drivers/media/i2c/ad5820.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/ad5820.c b/drivers/media/i2c/ad5820.c
> index 62cc1f54622f..d7ad5c1a1219 100644
> --- a/drivers/media/i2c/ad5820.c
> +++ b/drivers/media/i2c/ad5820.c
> @@ -58,7 +58,7 @@ struct ad5820_device {
>  	struct mutex power_lock;
>  	int power_count;
>  
> -	int standby : 1;
> +	unsigned int standby : 1;

I guess a bool would be a better match for this one. It's what it's used
for. [01] assignments should be replaced by boolean values.

I can submit a patch for this as well, up to you.

>  };
>  
>  static int ad5820_write(struct ad5820_device *coil, u16 data)
> 


-- 
Sakari Ailus
sakari.ailus@linux.intel.com

      reply	other threads:[~2016-08-24 11:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24 11:23 [PATCH] [media] ad5820: fix one smatch warning Mauro Carvalho Chehab
2016-08-24 11:46 ` Sakari Ailus [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=57BD8924.9000405@linux.intel.com \
    --to=sakari.ailus@linux.intel.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@kernel.org \
    --cc=mchehab@s-opensource.com \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    /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).