Skip to contentSkip to conversation

v4l: copy_to_user() is not a good method name

PATCH In review Al Viro 3 participants 3 messages Oct 13, 2007 Media (V4L/DVB)

lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 1/1 v4l: copy_to_user() is not a good method name

Breaks on any target that has copy_to_user() defined as a non-trivial macro.

---

drivers/media/video/videobuf-core.c +1 -1
index c606332..5599a36 100644
@@ -674,7 +674,7 @@ ssize_t videobuf_read_one(struct videobuf_queue *q,
 	}
 
 	/* Copy to userspace */
-	retval=CALL(q,copy_to_user,q,data,count,nonblocking);
+	retval=CALL(q,video_copy_to_user,q,data,count,nonblocking);
 	if (retval<0)
 		goto done;
 
drivers/media/video/videobuf-dma-sg.c +1 -1
index 8bb7fdd..3eb6123 100644
@@ -670,7 +670,7 @@ static struct videobuf_qtype_ops pci_ops = {
 	.sync         = __videobuf_sync,
 	.mmap_free    = __videobuf_mmap_free,
 	.mmap_mapper  = __videobuf_mmap_mapper,
-	.copy_to_user = __videobuf_copy_to_user,
+	.video_copy_to_user = __videobuf_copy_to_user,
 	.copy_stream  = __videobuf_copy_stream,
 };
 
drivers/media/video/videobuf-vmalloc.c +1 -1
index 2e3689a..cd74341 100644
@@ -320,7 +320,7 @@ static struct videobuf_qtype_ops qops = {
 	.sync         = __videobuf_sync,
 	.mmap_free    = __videobuf_mmap_free,
 	.mmap_mapper  = __videobuf_mmap_mapper,
-	.copy_to_user = __videobuf_copy_to_user,
+	.video_copy_to_user = __videobuf_copy_to_user,
 	.copy_stream  = __videobuf_copy_stream,
 };
 
include/media/videobuf-core.h +1 -1
index 9fa09fb..0fa5d59 100644
@@ -133,7 +133,7 @@ struct videobuf_qtype_ops {
 				 enum v4l2_memory memory);
 	int (*sync)		(struct videobuf_queue* q,
 				 struct videobuf_buffer *buf);
-	int (*copy_to_user)	(struct videobuf_queue *q,
+	int (*video_copy_to_user)(struct videobuf_queue *q,
 				 char __user *data,
 				 size_t count,
 				 int nonblocking);
#1 lore raw
Quoted 2 lines · Al Viro

Breaks on any target that has copy_to_user() defined as a non-trivial macro.

Where did that CALL crap come from? We normally don;t accept junk like that.