linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Hans Verkuil <hans.verkuil@cisco.com>, Greg KH <greg@kroah.com>
Subject: Re: linux-next: build failure after merge of the final tree (v4l-dvb tree related)
Date: Tue, 26 Mar 2013 09:04:52 -0300	[thread overview]
Message-ID: <20130326090452.01550c37@redhat.com> (raw)
In-Reply-To: <20130326171847.18cd41b85d3caee6373d9447@canb.auug.org.au>

[-- 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 --]

  reply	other threads:[~2013-03-26 12:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=20130326090452.01550c37@redhat.com \
    --to=mchehab@redhat.com \
    --cc=greg@kroah.com \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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).