Skip to content

Commit

Permalink
[media] staging/media: lirc_imon: add a __user annotation
Browse files Browse the repository at this point in the history
This silences the following Sparse warnings:
lirc_imon.c:404:32: warning: incorrect type in argument 1 (different address spaces)
lirc_imon.c:404:32:    expected void const [noderef] <asn:1>*<noident>
lirc_imon.c:404:32:    got char const *buf
lirc_imon.c:117:28: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
lirc_imon.c:117:28:    expected long ( *write )( ... )
lirc_imon.c:117:28:    got long ( static [toplevel] *<noident> )( ... )

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Nov 26, 2011
1 parent 75c1ca3 commit 87d466e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/media/lirc/lirc_imon.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static int display_open(struct inode *inode, struct file *file);
static int display_close(struct inode *inode, struct file *file);

/* VFD write operation */
static ssize_t vfd_write(struct file *file, const char *buf,
static ssize_t vfd_write(struct file *file, const char __user *buf,
size_t n_bytes, loff_t *pos);

/* LIRC driver function prototypes */
Expand Down Expand Up @@ -369,7 +369,7 @@ static int send_packet(struct imon_context *context)
* than 32 bytes are provided spaces will be appended to
* generate a full screen.
*/
static ssize_t vfd_write(struct file *file, const char *buf,
static ssize_t vfd_write(struct file *file, const char __user *buf,
size_t n_bytes, loff_t *pos)
{
int i;
Expand Down

0 comments on commit 87d466e

Please sign in to comment.