* [patch 2/3] [media] lirc_dev: add some __user annotations
@ 2010-11-17 5:13 Dan Carpenter
2010-11-17 20:22 ` Jarod Wilson
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-11-17 5:13 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Jarod Wilson, Zimny Lech, linux-media, kernel-janitors
Sparse complains because there are no __user annotations.
drivers/media/IR/lirc_dev.c:156:27: warning:
incorrect type in initializer (incompatible argument 2 (different address spaces))
drivers/media/IR/lirc_dev.c:156:27: expected int ( *read )( ... )
drivers/media/IR/lirc_dev.c:156:27: got int ( extern [toplevel] *<noident> )( ... )
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/include/media/lirc_dev.h b/include/media/lirc_dev.h
index 54780a5..630e702 100644
--- a/include/media/lirc_dev.h
+++ b/include/media/lirc_dev.h
@@ -217,9 +217,9 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file);
int lirc_dev_fop_close(struct inode *inode, struct file *file);
unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait);
long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
-ssize_t lirc_dev_fop_read(struct file *file, char *buffer, size_t length,
+ssize_t lirc_dev_fop_read(struct file *file, char __user *buffer, size_t length,
loff_t *ppos);
-ssize_t lirc_dev_fop_write(struct file *file, const char *buffer, size_t length,
- loff_t *ppos);
+ssize_t lirc_dev_fop_write(struct file *file, const char __user *buffer,
+ size_t length, loff_t *ppos);
#endif
diff --git a/drivers/media/IR/lirc_dev.c b/drivers/media/IR/lirc_dev.c
index 8ab9d87..fbca94f 100644
--- a/drivers/media/IR/lirc_dev.c
+++ b/drivers/media/IR/lirc_dev.c
@@ -627,7 +627,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
EXPORT_SYMBOL(lirc_dev_fop_ioctl);
ssize_t lirc_dev_fop_read(struct file *file,
- char *buffer,
+ char __user *buffer,
size_t length,
loff_t *ppos)
{
@@ -742,7 +742,7 @@ void *lirc_get_pdata(struct file *file)
EXPORT_SYMBOL(lirc_get_pdata);
-ssize_t lirc_dev_fop_write(struct file *file, const char *buffer,
+ssize_t lirc_dev_fop_write(struct file *file, const char __user *buffer,
size_t length, loff_t *ppos)
{
struct irctl *ir = irctls[iminor(file->f_dentry->d_inode)];
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch 2/3] [media] lirc_dev: add some __user annotations
2010-11-17 5:13 [patch 2/3] [media] lirc_dev: add some __user annotations Dan Carpenter
@ 2010-11-17 20:22 ` Jarod Wilson
0 siblings, 0 replies; 2+ messages in thread
From: Jarod Wilson @ 2010-11-17 20:22 UTC (permalink / raw)
To: Dan Carpenter
Cc: Mauro Carvalho Chehab, Zimny Lech, linux-media, kernel-janitors
On Wed, Nov 17, 2010 at 08:13:39AM +0300, Dan Carpenter wrote:
> Sparse complains because there are no __user annotations.
>
> drivers/media/IR/lirc_dev.c:156:27: warning:
> incorrect type in initializer (incompatible argument 2 (different address spaces))
> drivers/media/IR/lirc_dev.c:156:27: expected int ( *read )( ... )
> drivers/media/IR/lirc_dev.c:156:27: got int ( extern [toplevel] *<noident> )( ... )
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
--
Jarod Wilson
jarod@redhat.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-17 20:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-17 5:13 [patch 2/3] [media] lirc_dev: add some __user annotations Dan Carpenter
2010-11-17 20:22 ` Jarod Wilson
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).