linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the final tree (v4l-dvb tree related)
@ 2013-03-26  6:18 Stephen Rothwell
  2013-03-26 12:04 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2013-03-26  6:18 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next, linux-kernel, Hans Verkuil, Greg KH

[-- Attachment #1: Type: text/plain, Size: 1358 bytes --]

Hi all,

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:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 26 Mar 2013 17:14:47 +1100
Subject: [PATCH] disable solo6x10 driver due to build errors

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/staging/media/solo6x10/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/media/solo6x10/Kconfig b/drivers/staging/media/solo6x10/Kconfig
index ec32776..a6a970f 100644
--- a/drivers/staging/media/solo6x10/Kconfig
+++ b/drivers/staging/media/solo6x10/Kconfig
@@ -1,6 +1,7 @@
 config SOLO6X10
 	tristate "Softlogic 6x10 MPEG codec cards"
 	depends on PCI && VIDEO_DEV && SND && I2C
+	depends on BROKEN
 	select VIDEOBUF2_DMA_SG
 	select VIDEOBUF2_DMA_CONTIG
 	select SND_PCM
-- 
1.8.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: linux-next: build failure after merge of the final tree (v4l-dvb tree related)
  2013-03-26  6:18 linux-next: build failure after merge of the final tree (v4l-dvb tree related) Stephen Rothwell
@ 2013-03-26 12:04 ` Mauro Carvalho Chehab
  2013-03-26 23:52   ` Stephen Rothwell
  0 siblings, 1 reply; 11+ messages in thread
From: Mauro Carvalho Chehab @ 2013-03-26 12:04 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Hans Verkuil, Greg KH

[-- Attachment #1: Type: text/plain, Size: 5256 bytes --]

Em Tue, 26 Mar 2013 17:18:47 +1100
Stephen Rothwell <sfr@canb.auug.org.au> escreveu:

> Hi all,
> 
> 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?

Anyway, could you please try the enclosed patch?

-

[PATCH] [media] ioctl numbers are unsigned int

As reported by Stephen Rothwell <sfr@canb.auug.org.au>:
> 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

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/pci/cx18/cx18-ioctl.c b/drivers/media/pci/cx18/cx18-ioctl.c
index 7dbd5a9..aee7b6d 100644
--- a/drivers/media/pci/cx18/cx18-ioctl.c
+++ b/drivers/media/pci/cx18/cx18-ioctl.c
@@ -1110,7 +1110,7 @@ static int cx18_log_status(struct file *file, void *fh)
 }
 
 static long cx18_default(struct file *file, void *fh, bool valid_prio,
-							int cmd, void *arg)
+			 unsigned int cmd, void *arg)
 {
 	struct cx18 *cx = fh2id(fh)->cx;
 
diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c
index 50379b2..9cbbce0 100644
--- a/drivers/media/pci/ivtv/ivtv-ioctl.c
+++ b/drivers/media/pci/ivtv/ivtv-ioctl.c
@@ -1807,7 +1807,7 @@ static int ivtv_decoder_ioctls(struct file *filp, unsigned int cmd, void *arg)
 }
 
 static long ivtv_default(struct file *file, void *fh, bool valid_prio,
-			 int cmd, void *arg)
+			 unsigned int cmd, void *arg)
 {
 	struct ivtv *itv = fh2id(fh)->itv;
 
diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c
index 7859c43..2381b05 100644
--- a/drivers/media/pci/meye/meye.c
+++ b/drivers/media/pci/meye/meye.c
@@ -1410,7 +1410,7 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i)
 }
 
 static long vidioc_default(struct file *file, void *fh, bool valid_prio,
-						int cmd, void *arg)
+			   unsigned int cmd, void *arg)
 {
 	switch (cmd) {
 	case MEYEIOC_G_PARAMS:
diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c
index 20db8a0..8c50d30 100644
--- a/drivers/media/platform/davinci/vpfe_capture.c
+++ b/drivers/media/platform/davinci/vpfe_capture.c
@@ -1686,7 +1686,7 @@ unlock_out:
 
 
 static long vpfe_param_handler(struct file *file, void *priv,
-		bool valid_prio, int cmd, void *param)
+		bool valid_prio, unsigned int cmd, void *param)
 {
 	struct vpfe_device *vpfe_dev = video_drvdata(file);
 	int ret = 0;
diff --git a/drivers/media/radio/radio-si4713.c b/drivers/media/radio/radio-si4713.c
index 2a2d21e..38b3f15 100644
--- a/drivers/media/radio/radio-si4713.c
+++ b/drivers/media/radio/radio-si4713.c
@@ -222,7 +222,7 @@ static int radio_si4713_s_frequency(struct file *file, void *p,
 }
 
 static long radio_si4713_default(struct file *file, void *p,
-				 bool valid_prio, int cmd, void *arg)
+				 bool valid_prio, unsigned int cmd, void *arg)
 {
 	return v4l2_device_call_until_err(get_v4l2_dev(file), 0, core,
 					  ioctl, cmd, arg);
diff --git a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c
index 39a8fb2..6c7d20f 100644
--- a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c
+++ b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c
@@ -1021,7 +1021,7 @@ static int solo_s_parm(struct file *file, void *priv,
 }
 
 static long solo_enc_default(struct file *file, void *fh,
-			bool valid_prio, int cmd, void *arg)
+			bool valid_prio, unsigned int cmd, void *arg)
 {
 	struct solo_enc_dev *solo_enc = video_drvdata(file);
 	struct solo_dev *solo_dev = solo_enc->solo_dev;
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h
index 75a7dfc..b273f0e 100644
--- a/include/media/v4l2-ioctl.h
+++ b/include/media/v4l2-ioctl.h
@@ -275,7 +275,7 @@ struct v4l2_ioctl_ops {
 
 	/* For other private ioctls */
 	long (*vidioc_default)	       (struct file *file, void *fh,
-					bool valid_prio, int cmd, void *arg);
+					bool valid_prio, unsigned int cmd, void *arg);
 };
 
 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: linux-next: build failure after merge of the final tree (v4l-dvb tree related)
  2013-03-26 12:04 ` Mauro Carvalho Chehab
@ 2013-03-26 23:52   ` Stephen Rothwell
  2013-03-27 11:11     ` Stephen Rothwell
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2013-03-26 23:52 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next, linux-kernel, Hans Verkuil, Greg KH

[-- Attachment #1: Type: text/plain, Size: 1843 bytes --]

Hi Mauro,

On Tue, 26 Mar 2013 09:04:52 -0300 Mauro Carvalho Chehab <mchehab@redhat.com> wrote:
>
> Em Tue, 26 Mar 2013 17:18:47 +1100
> Stephen Rothwell <sfr@canb.auug.org.au> 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

:-(
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: build failure after merge of the final tree (v4l-dvb tree related)
  2013-03-26 23:52   ` Stephen Rothwell
@ 2013-03-27 11:11     ` Stephen Rothwell
  0 siblings, 0 replies; 11+ messages in thread
From: Stephen Rothwell @ 2013-03-27 11:11 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next, linux-kernel, Hans Verkuil, Greg KH

[-- Attachment #1: Type: text/plain, Size: 2187 bytes --]

Hi Mauro,

On Wed, 27 Mar 2013 10:52:34 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Tue, 26 Mar 2013 09:04:52 -0300 Mauro Carvalho Chehab <mchehab@redhat.com> wrote:
> >
> > Em Tue, 26 Mar 2013 17:18:47 +1100
> > Stephen Rothwell <sfr@canb.auug.org.au> 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@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: build failure after merge of the final tree (v4l-dvb tree related)
  2013-07-08 12:58 ` Mauro Carvalho Chehab
@ 2013-07-09  7:03   ` Stephen Rothwell
  0 siblings, 0 replies; 11+ messages in thread
From: Stephen Rothwell @ 2013-07-09  7:03 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Mauro Carvalho Chehab, linux-next, linux-kernel, Linus

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

Hi Mauro,

On Mon, 8 Jul 2013 09:58:19 -0300 (BRT) Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
>
> I'll wait for tomorrow's next to see if everything is ok, before sending a 
> new pull request.

Looks good today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: build failure after merge of the final tree (v4l-dvb tree related)
  2013-07-08  5:26 Stephen Rothwell
@ 2013-07-08 12:58 ` Mauro Carvalho Chehab
  2013-07-09  7:03   ` Stephen Rothwell
  0 siblings, 1 reply; 11+ messages in thread
From: Mauro Carvalho Chehab @ 2013-07-08 12:58 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Mauro Carvalho Chehab, linux-next, linux-kernel, Linus

On Mon, 8 Jul 2013, Stephen Rothwell wrote:

> Hi all,
>
> After merging the final tree, today's linux-next build
> (powerpc_ppc44x_defconfig) failed like this:
>
> arch/powerpc/boot/wrapper: line 314: .../scripts/mkuboot.sh: Permission denied
>
> Caused by commit cda2bf15f6dc ("Update email to m.chehab@samsung.com")
> from the v4l-dvb tree.

Sorry. That was due to a bad merge at my -next tree, where I had there 
both the correct and the wrong patches merged. The correct changeset
is this one:
 	http://git.linuxtv.org/mchehab/media-next.git/commit/de58f1a28541fef62f20465dcd1bbcf25b4685c5

It is fixed there already.

> I have reverted that commit for today.
>
> Linus, please don't merge the v4l-dvb tree like it is.

I'll wait for tomorrow's next to see if everything is ok, before sending a 
new pull request.

> Mauro, in the case of copyright notices, you should just remove your
> email address, not bother changing it.

Hmm... then I'll need to re-do the patch, manually reviewing each hunk, 
instead of replacing via a script, as, on some places, like MAINTAINERS, 
we need to preserve the email.

Let me simplify it: I'll drop that patch, replacing by one that will
just change MAINTAINERS. I'll later submit the remaining changes on
a separate patch for the next merge window.

Regards,
Mauro

^ permalink raw reply	[flat|nested] 11+ messages in thread

* linux-next: build failure after merge of the final tree (v4l-dvb tree related)
@ 2013-07-08  5:26 Stephen Rothwell
  2013-07-08 12:58 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2013-07-08  5:26 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: linux-next, linux-kernel, Mauro Carvalho Chehab, Linus

[-- Attachment #1: Type: text/plain, Size: 577 bytes --]

Hi all,

After merging the final tree, today's linux-next build
(powerpc_ppc44x_defconfig) failed like this:

arch/powerpc/boot/wrapper: line 314: .../scripts/mkuboot.sh: Permission denied

Caused by commit cda2bf15f6dc ("Update email to m.chehab@samsung.com")
from the v4l-dvb tree.

I have reverted that commit for today.

Linus, please don't merge the v4l-dvb tree like it is.

Mauro, in the case of copyright notices, you should just remove your
email address, not bother changing it.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: build failure after merge of the final tree (v4l-dvb tree related)
  2010-11-23  2:38 Stephen Rothwell
@ 2010-12-07  3:18 ` Stephen Rothwell
  0 siblings, 0 replies; 11+ messages in thread
From: Stephen Rothwell @ 2010-12-07  3:18 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: linux-next, linux-kernel, "Richard Röjfors"

Hi Mauro,

On Tue, 23 Nov 2010 13:38:07 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/media/video/timblogiw.c: In function 'timblogiw_probe':
> drivers/media/video/timblogiw.c:749: error: timblogiw_ioctl_ops causes a section type conflict
> 
> Caused by commit ef6ce9acc5f87e253c97dfd5301f8036f937f595 ("[media]
> [1/2,v4] media: Add timberdale video-in driver") which declared some
> structs as const and __devinitdata.  They should use __devinitconst.

I am still getting this ...

This is the patch that I am applying:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 23 Nov 2010 13:35:17 +1100
Subject: [PATCH] media: const and __devinitdata do not mix

This fixes the following error in PowerPC builds:

drivers/media/video/timblogiw.c: In function 'timblogiw_probe':
drivers/media/video/timblogiw.c:749: error: timblogiw_ioctl_ops causes a section type conflict

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/media/video/timblogiw.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/video/timblogiw.c b/drivers/media/video/timblogiw.c
index bddcdb6..cf48aa9 100644
--- a/drivers/media/video/timblogiw.c
+++ b/drivers/media/video/timblogiw.c
@@ -746,7 +746,7 @@ static int timblogiw_mmap(struct file *file, struct vm_area_struct *vma)
 
 /* Platform device functions */
 
-static const __devinitdata struct v4l2_ioctl_ops timblogiw_ioctl_ops = {
+static __devinitconst struct v4l2_ioctl_ops timblogiw_ioctl_ops = {
 	.vidioc_querycap		= timblogiw_querycap,
 	.vidioc_enum_fmt_vid_cap	= timblogiw_enum_fmt,
 	.vidioc_g_fmt_vid_cap		= timblogiw_g_fmt,
@@ -768,7 +768,7 @@ static const __devinitdata struct v4l2_ioctl_ops timblogiw_ioctl_ops = {
 	.vidioc_enum_framesizes		= timblogiw_enum_framesizes,
 };
 
-static const __devinitdata struct v4l2_file_operations timblogiw_fops = {
+static __devinitconst struct v4l2_file_operations timblogiw_fops = {
 	.owner		= THIS_MODULE,
 	.open		= timblogiw_open,
 	.release	= timblogiw_close,
@@ -778,7 +778,7 @@ static const __devinitdata struct v4l2_file_operations timblogiw_fops = {
 	.poll		= timblogiw_poll,
 };
 
-static const __devinitdata struct video_device timblogiw_template = {
+static __devinitconst struct video_device timblogiw_template = {
 	.name		= TIMBLOGIWIN_NAME,
 	.fops		= &timblogiw_fops,
 	.ioctl_ops	= &timblogiw_ioctl_ops,
-- 
1.7.2.3

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* linux-next: build failure after merge of the final tree (v4l-dvb tree related)
@ 2010-11-23  2:38 Stephen Rothwell
  2010-12-07  3:18 ` Stephen Rothwell
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2010-11-23  2:38 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: linux-next, linux-kernel, "Richard Röjfors"

Hi Mauro,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/media/video/timblogiw.c: In function 'timblogiw_probe':
drivers/media/video/timblogiw.c:749: error: timblogiw_ioctl_ops causes a section type conflict

Caused by commit ef6ce9acc5f87e253c97dfd5301f8036f937f595 ("[media]
[1/2,v4] media: Add timberdale video-in driver") which declared some
structs as const and __devinitdata.  They should use __devinitconst.

I applied the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 23 Nov 2010 13:35:17 +1100
Subject: [PATCH] media: const and __devinitdata do not mix

This fixes the following error in PowerPC builds:

drivers/media/video/timblogiw.c: In function 'timblogiw_probe':
drivers/media/video/timblogiw.c:749: error: timblogiw_ioctl_ops causes a section type conflict

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/media/video/timblogiw.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/video/timblogiw.c b/drivers/media/video/timblogiw.c
index bddcdb6..cf48aa9 100644
--- a/drivers/media/video/timblogiw.c
+++ b/drivers/media/video/timblogiw.c
@@ -746,7 +746,7 @@ static int timblogiw_mmap(struct file *file, struct vm_area_struct *vma)
 
 /* Platform device functions */
 
-static const __devinitdata struct v4l2_ioctl_ops timblogiw_ioctl_ops = {
+static __devinitconst struct v4l2_ioctl_ops timblogiw_ioctl_ops = {
 	.vidioc_querycap		= timblogiw_querycap,
 	.vidioc_enum_fmt_vid_cap	= timblogiw_enum_fmt,
 	.vidioc_g_fmt_vid_cap		= timblogiw_g_fmt,
@@ -768,7 +768,7 @@ static const __devinitdata struct v4l2_ioctl_ops timblogiw_ioctl_ops = {
 	.vidioc_enum_framesizes		= timblogiw_enum_framesizes,
 };
 
-static const __devinitdata struct v4l2_file_operations timblogiw_fops = {
+static __devinitconst struct v4l2_file_operations timblogiw_fops = {
 	.owner		= THIS_MODULE,
 	.open		= timblogiw_open,
 	.release	= timblogiw_close,
@@ -778,7 +778,7 @@ static const __devinitdata struct v4l2_file_operations timblogiw_fops = {
 	.poll		= timblogiw_poll,
 };
 
-static const __devinitdata struct video_device timblogiw_template = {
+static __devinitconst struct video_device timblogiw_template = {
 	.name		= TIMBLOGIWIN_NAME,
 	.fops		= &timblogiw_fops,
 	.ioctl_ops	= &timblogiw_ioctl_ops,
-- 
1.7.2.3

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: linux-next: build failure after merge of the final tree (v4l-dvb tree related)
  2010-10-19  7:07 Stephen Rothwell
@ 2010-10-21 10:53 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 11+ messages in thread
From: Mauro Carvalho Chehab @ 2010-10-21 10:53 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, linux-kernel, Palash Bandyopadhyay,
	Devin Heitmueller, Arnd Bergmann

Hi Stephen,

Em 19-10-2010 05:07, Stephen Rothwell escreveu:
> Hi Mauro,
> 
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/media/video/cx231xx/cx231xx-417.c: In function 'cx231xx_load_firmware':
> drivers/media/video/cx231xx/cx231xx-417.c:943: error: implicit declaration of function 'vmalloc'
> drivers/media/video/cx231xx/cx231xx-417.c:943: warning: cast to pointer from integer of different size
> drivers/media/video/cx231xx/cx231xx-417.c:950: warning: cast to pointer from integer of different size
> drivers/media/video/cx231xx/cx231xx-417.c:1039: error: implicit declaration of function 'vfree'
> 
> Caused by commit e0bb3704be9decb10985b0886031e76a228b5f32 ("[media]
> cx231xx: Added support for Carraera, Shelby, RDx_253S and VIDEO_GRABBER").
> 
> 
> I added the following patch for today:

Thanks, I'm adding it to my tree. It seems that some header conditionally includes vmalloc.h or slab.h.
At least, on my builds here with i386 and allyesconfig, no build errors appeared.

> Also, I don't think Arnd is going to like the new BKL usage also
> introduced by the commit.  ;-)

Yeah. Well, v4l is already on his list of BKL troubles. We're already addressing those
issues. We should have a BKL-free version of cx231xx-417.c for 2.6.38.

Cheers,
Mauro.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* linux-next: build failure after merge of the final tree (v4l-dvb tree related)
@ 2010-10-19  7:07 Stephen Rothwell
  2010-10-21 10:53 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2010-10-19  7:07 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: linux-next, linux-kernel, Palash Bandyopadhyay,
	Devin Heitmueller, Arnd Bergmann

Hi Mauro,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/media/video/cx231xx/cx231xx-417.c: In function 'cx231xx_load_firmware':
drivers/media/video/cx231xx/cx231xx-417.c:943: error: implicit declaration of function 'vmalloc'
drivers/media/video/cx231xx/cx231xx-417.c:943: warning: cast to pointer from integer of different size
drivers/media/video/cx231xx/cx231xx-417.c:950: warning: cast to pointer from integer of different size
drivers/media/video/cx231xx/cx231xx-417.c:1039: error: implicit declaration of function 'vfree'

Caused by commit e0bb3704be9decb10985b0886031e76a228b5f32 ("[media]
cx231xx: Added support for Carraera, Shelby, RDx_253S and VIDEO_GRABBER").

Also, I don't think Arnd is going to like the new BKL usage also
introduced by the commit.  ;-)

I added the following patch for today:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 19 Oct 2010 18:01:25 +1100
Subject: [PATCH] v4l-dvb: using vmalloc needs vmalloc.h in cx231xx-417.c

Fixes these build errors and warnings:

drivers/media/video/cx231xx/cx231xx-417.c: In function 'cx231xx_load_firmware':
drivers/media/video/cx231xx/cx231xx-417.c:943: error: implicit declaration of function 'vmalloc'
drivers/media/video/cx231xx/cx231xx-417.c:943: warning: cast to pointer from integer of different size
drivers/media/video/cx231xx/cx231xx-417.c:950: warning: cast to pointer from integer of different size
drivers/media/video/cx231xx/cx231xx-417.c:1039: error: implicit declaration of function 'vfree'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/media/video/cx231xx/cx231xx-417.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/cx231xx/cx231xx-417.c b/drivers/media/video/cx231xx/cx231xx-417.c
index e456b97..aab21f3 100644
--- a/drivers/media/video/cx231xx/cx231xx-417.c
+++ b/drivers/media/video/cx231xx/cx231xx-417.c
@@ -32,6 +32,7 @@
 #include <linux/device.h>
 #include <linux/firmware.h>
 #include <linux/smp_lock.h>
+#include <linux/vmalloc.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-ioctl.h>
 #include <media/cx2341x.h>
-- 
1.7.1

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-07-09  7:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-26  6:18 linux-next: build failure after merge of the final tree (v4l-dvb tree related) Stephen Rothwell
2013-03-26 12:04 ` Mauro Carvalho Chehab
2013-03-26 23:52   ` Stephen Rothwell
2013-03-27 11:11     ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2013-07-08  5:26 Stephen Rothwell
2013-07-08 12:58 ` Mauro Carvalho Chehab
2013-07-09  7:03   ` Stephen Rothwell
2010-11-23  2:38 Stephen Rothwell
2010-12-07  3:18 ` Stephen Rothwell
2010-10-19  7:07 Stephen Rothwell
2010-10-21 10:53 ` Mauro Carvalho Chehab

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).