Re: linux-next: build failure after merge of the final tree(v4l-dvb tree related)

From: Stephen Rothwell
Date: Wed Mar 27 2013 - 07:11:50 EST


Hi Mauro,

On Wed, 27 Mar 2013 10:52:34 +1100 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, 26 Mar 2013 09:04:52 -0300 Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> wrote:
> >
> > Em Tue, 26 Mar 2013 17:18:47 +1100
> > Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> escreveu:
> >
> > > After merging the final tree, today's linux-next build (powerpc
> > > allyesconfig) failed like this:
> > >
> > > drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c: In function 'solo_enc_default':
> > > drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c:1031:7: error: case label does not reduce to an integer constant
> > > drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c:1035:7: error: case label does not reduce to an integer constant
> > >
> > > I am not sure why this has suddenly appeared, but I have disabled the
> > > driver for now using this patch:
> >
> > Well, solo6x10 didn't use to have its own private ioctl's until now.
> > Still, that's strange, as there are other drivers also using vidioc_default.
> >
> > I suspect that those _IO* have its highest bit equal to 1 on powerpc
> > being too big for int. If so, the enclosed patch should fix.
> > I'm still wandering why it didn't cause any compilation problems here.
> >
> > Ok, I didn't try to compile it on powerpc, but still integers have 32
> > bits on ppc, right?
>
> yes.
>
> > Anyway, could you please try the enclosed patch?
>
> Doesn't help.
>
> on powerpc, SOLO_IOC_G_MOTION_THRESHOLDS expands to
>
> (((2U) << (((0 +8)+8)+13)) | ((('V')) << (0 +8)) | (((192 +0)) << 0) | (((((sizeof(struct solo_motion_thresholds) == sizeof(struct solo_motion_thresholds[1]) && sizeof(struct solo_motion_thresholds) < (1 << 13)) ? sizeof(struct solo_motion_thresholds) : __invalid_size_argument_for_IOC))) << ((0 +8)+8)))
>
> sizeof(struct solo_motion_thresholds) is 64*64*2 == 8192 which is not
> less than 1 << 13

Note that this will also break on alpha and mips. Sparc seems to have a
tricky workaround (to allow 14 bits for size) - I wonder if that could be
used for these other arches as well?

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

Attachment: pgp00000.pgp
Description: PGP signature