Skip to contentSkip to conversation

media_build wrong patch

PATCH Rafael van Horn 2 participants 2 messages Jul 17, 2014 – Jul 18, 2014 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi,

I'd like to file a bug in the latest commit: b6f4c524e0fe8f2d50b0a2f849e022adef76c6cc

The file backports/api_version.patch rejects to patch the linux/drivers/media/v4l2-core/v4l2-ioctl.c because of wrong line numbers and because the code doesn't match.

This is your code:
-----------------------------------------------------------------------

drivers/media/v4l2-core/v4l2-ioctl.c +1 -1
@@ -1009,7 +1009,7 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops,
 	struct v4l2_capability *cap = (struct v4l2_capability *)arg;
 	int ret;
 
-	cap->version = LINUX_VERSION_CODE;
+	cap->version = V4L2_VERSION;
 
 	ret = ops->vidioc_querycap(file, fh, cap);
 

-----------------------------------------------------------------------

This should be there:
-----------------------------------------------------------------------

drivers/media/v4l2-core/v4l2-ioctl.c +1 -1
@@ -964,7 +964,7 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops,
 {
 	struct v4l2_capability *cap = (struct v4l2_capability *)arg;
 
-	cap->version = LINUX_VERSION_CODE;
+	cap->version = V4L2_VERSION;
 	return ops->vidioc_querycap(file, fh, cap);
 }
 

-----------------------------------------------------------------------

In the C file there's no ret variable and all the code is moved somewhere else, but it's not @@ line 1009.

The diff file is attached.

When I hacked the patch file, I built everything.

Regards.
Rafael van Horn

-----------------------------------------------------------------------

Debian 7.6
gcc Version: 4:4.7.2-1
make Version: 3.81-8.2
perl Version: 5.14.2-21+deb7u1
linux-headers-amd64 Version: 3.2+46
patch Version: 2.6.1-3

api_version.patch renamed from backports/api_version.patch +4 -4
@@ -41,12 +41,12 @@
 index e0bafda..6225391 100644
 --- a/drivers/media/v4l2-core/v4l2-ioctl.c
 +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
-@@ -1009,7 +1009,7 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops,
+@@ -964,7 +964,7 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops,
+ {
  	struct v4l2_capability *cap = (struct v4l2_capability *)arg;
- 	int ret;
  
 -	cap->version = LINUX_VERSION_CODE;
 +	cap->version = V4L2_VERSION;
- 
- 	ret = ops->vidioc_querycap(file, fh, cap);
+ 	return ops->vidioc_querycap(file, fh, cap);
+ }
  
#1 lore raw
Quoted 8 lines · Rafael van Horn

Hi,

I'd like to file a bug in the latest commit:
b6f4c524e0fe8f2d50b0a2f849e022adef76c6cc

The file backports/api_version.patch rejects to patch the linux/drivers/media/v4l2-core/v4l2-ioctl.c because of wrong line numbers and because the code doesn't match.

You are probably using the build script which downloads the code. That's build once a day and yours is old. Try again tomorrow, it should be fine again (or not, we're merging a lot of code, so breakages may happen for the next few days).

Regards,

Hans

Quoted 57 lines

This is your code:
-----------------------------------------------------------------------

drivers/media/v4l2-core/v4l2-ioctl.c +1 -2
@@ -1009,7 +1009,7 @@ static int v4l_querycap(const struct 
 v4l2_ioctl_ops *ops,
  	struct v4l2_capability *cap = (struct v4l2_capability *)arg;
  	int ret;
 
-	cap->version = LINUX_VERSION_CODE;
+	cap->version = V4L2_VERSION;
 
  	ret = ops->vidioc_querycap(file, fh, cap);
 
-----------------------------------------------------------------------

This should be there:
-----------------------------------------------------------------------

drivers/media/v4l2-core/v4l2-ioctl.c +1 -2
@@ -964,7 +964,7 @@ static int v4l_querycap(const struct v4l2_ioctl_ops 
 *ops,
  {
  	struct v4l2_capability *cap = (struct v4l2_capability *)arg;
 
-	cap->version = LINUX_VERSION_CODE;
+	cap->version = V4L2_VERSION;
  	return ops->vidioc_querycap(file, fh, cap);
  }
 
-----------------------------------------------------------------------

In the C file there's no ret variable and all the code is moved somewhere else, but it's not @@ line 1009.

The diff file is attached.

When I hacked the patch file, I built everything.

Regards.
Rafael van Horn

-----------------------------------------------------------------------

Debian 7.6
gcc Version: 4:4.7.2-1
make Version: 3.81-8.2
perl Version: 5.14.2-21+deb7u1
linux-headers-amd64 Version: 3.2+46
patch Version: 2.6.1-3