All of lore.kernel.org
 help / color / mirror / Atom feed
* media_build wrong patch
@ 2014-07-17 23:46 Rafael van Horn
  2014-07-18  0:03 ` Hans Verkuil
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael van Horn @ 2014-07-17 23:46 UTC (permalink / raw)
  To: linux-media

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

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:
-----------------------------------------------------------------------
--- 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,
  	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:
-----------------------------------------------------------------------
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -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

[-- Attachment #2: api_version.patch.diff --]
[-- Type: text/x-patch, Size: 684 bytes --]

--- MB/backports/api_version.patch	2014-07-18 00:48:54.773248546 +0200
+++ api_version.patch	2014-07-18 01:36:33.878313555 +0200
@@ -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);
+ }
  

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

end of thread, other threads:[~2014-07-18  0:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-17 23:46 media_build wrong patch Rafael van Horn
2014-07-18  0:03 ` Hans Verkuil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.