public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: 'Mauro Carvalho Chehab' <mchehab@infradead.org>,
	'Kyungmin Park' <kyungmin.park@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch 3/3] V4L/DVB: s5p-fimc: dubious one-bit signed bitfields
Date: Fri, 22 Oct 2010 10:13:04 +0200	[thread overview]
Message-ID: <20101022081304.GQ5985@bicker> (raw)
In-Reply-To: <000a01cb71b8$465248f0$d2f6dad0$%nawrocki@samsung.com>

On Fri, Oct 22, 2010 at 09:10:57AM +0200, Sylwester Nawrocki wrote:
> > -----Original Message-----
> > From: Dan Carpenter [mailto:error27@gmail.com]
> > Sent: Thursday, October 21, 2010 9:24 PM
> > To: Mauro Carvalho Chehab
> > Cc: Kyungmin Park; Sylwester Nawrocki; Pawel Osciak; Marek Szyprowski;
> > linux-media@vger.kernel.org; kernel-janitors@vger.kernel.org
> > Subject: [patch 3/3] V4L/DVB: s5p-fimc: dubious one-bit signed
> > bitfields
> > 
> > These are signed so instead of being 1 and 0 as intended they are -1
> > and
> > 0.  It doesn't cause a bug in the current code but Sparse warns about
> > it:
> > 
> > drivers/media/video/s5p-fimc/fimc-core.h:226:28:
> > 	error: dubious one-bit signed bitfield
> > 
> > Signed-off-by: Dan Carpenter <error27@gmail.com>
> > 
> > diff --git a/drivers/media/video/s5p-fimc/fimc-core.h
> > b/drivers/media/video/s5p-fimc/fimc-core.h
> > index e3a7c6a..7665a3f 100644
> > --- a/drivers/media/video/s5p-fimc/fimc-core.h
> > +++ b/drivers/media/video/s5p-fimc/fimc-core.h
> > @@ -222,10 +223,10 @@ struct fimc_effect {
> >   * @real_height:	source pixel (height - offset)
> >   */
> >  struct fimc_scaler {
> > -	int	scaleup_h:1;
> > -	int	scaleup_v:1;
> > -	int	copy_mode:1;
> > -	int	enabled:1;
> > +	unsigned int	scaleup_h:1;
> > +	unsigned int	caleup_v:1;
> > +	unsigned int	copy_mode:1;
> > +	unsigned int	enabled:1;
> >  	u32	hfactor;
> >  	u32	vfactor;
> >  	u32	pre_hratio;
> 
> In general I agree, however this patch would change scaleup_v:1 
> to caleup_v, so it cannot be applied in current form.

Crap!  I suck.  Thanks for catching that.

regards,
dan carpenter



      reply	other threads:[~2010-10-22  8:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21 19:24 [patch 3/3] V4L/DVB: s5p-fimc: dubious one-bit signed bitfields Dan Carpenter
2010-10-22  7:10 ` Sylwester Nawrocki
2010-10-22  8:13   ` Dan Carpenter [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=20101022081304.GQ5985@bicker \
    --to=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mchehab@infradead.org \
    --cc=s.nawrocki@samsung.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