public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>,
	Mauro Carvalho Chehab <mchehab@redhat.com>,
	linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] [media] go7007: dubious one-bit signed bitfields
Date: Wed, 17 Apr 2013 07:49:18 +0000	[thread overview]
Message-ID: <201304170949.18362.hverkuil@xs4all.nl> (raw)
In-Reply-To: <20130417072029.GF7923@elgon.mountain>

On Wed 17 April 2013 09:20:30 Dan Carpenter wrote:
> Because they're signed, "is_video" and "is_audio" can be 0 and -1
> instead of 0 and 1 as intended.  It doesn't cause a bug, but it makes
> Sparse complain:
> drivers/staging/media/go7007/go7007-priv.h:94:31: error: dubious one-bit signed bitfield
> drivers/staging/media/go7007/go7007-priv.h:95:31: error: dubious one-bit signed bitfield
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

Thanks!

	Hans

> 
> diff --git a/drivers/staging/media/go7007/go7007-priv.h b/drivers/staging/media/go7007/go7007-priv.h
> index 8bde187..6e16af7 100644
> --- a/drivers/staging/media/go7007/go7007-priv.h
> +++ b/drivers/staging/media/go7007/go7007-priv.h
> @@ -91,8 +91,8 @@ struct go7007_board_info {
>  	int num_i2c_devs;
>  	struct go_i2c {
>  		const char *type;
> -		int is_video:1;
> -		int is_audio:1;
> +		unsigned int is_video:1;
> +		unsigned int is_audio:1;
>  		int addr;
>  		u32 flags;
>  	} i2c_devs[5];
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

      reply	other threads:[~2013-04-17  7:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17  7:20 [patch] [media] go7007: dubious one-bit signed bitfields Dan Carpenter
2013-04-17  7:49 ` Hans Verkuil [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=201304170949.18362.hverkuil@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=dan.carpenter@oracle.com \
    --cc=hans.verkuil@cisco.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.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