aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup/speakup_soft.c
diff options
context:
space:
mode:
authorEmil Goode <emilgoode@gmail.com>2013-05-22 20:53:09 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-22 15:35:52 -0700
commit7c10f1cd31fc9d6719e204a3c839c5c93ff413c1 (patch)
tree67d4093bfbac3c8d88bb87b4d991ec59fdf15312 /drivers/staging/speakup/speakup_soft.c
parentStaging: speakup/main: Staticize local symbols (diff)
downloadlinux-dev-7c10f1cd31fc9d6719e204a3c839c5c93ff413c1.tar.xz
linux-dev-7c10f1cd31fc9d6719e204a3c839c5c93ff413c1.zip
staging: speakup: fix warnings by adding __user annotations
This patch fixes the following sparse warnings by adding __user annotations. drivers/staging/speakup/speakup_soft.c:248:34: warning: incorrect type in argument 1 (different address spaces) drivers/staging/speakup/speakup_soft.c:248:34: expected void [noderef] <asn:1>*dst drivers/staging/speakup/speakup_soft.c:248:34: got char *[assigned] cp drivers/staging/speakup/speakup_soft.c:272:40: warning: incorrect type in argument 1 (different address spaces) drivers/staging/speakup/speakup_soft.c:272:40: expected char const [noderef] <asn:1>*s drivers/staging/speakup/speakup_soft.c:272:40: got char const *buf drivers/staging/speakup/speakup_soft.c:306:17: warning: incorrect type in initializer (incompatible argument 2 (different address spaces)) drivers/staging/speakup/speakup_soft.c:306:17: expected long ( *read )( ... ) drivers/staging/speakup/speakup_soft.c:306:17: got long ( static [toplevel] *<noident> )( ... ) drivers/staging/speakup/speakup_soft.c:307:18: warning: incorrect type in initializer (incompatible argument 2 (different address spaces)) drivers/staging/speakup/speakup_soft.c:307:18: expected long ( *write )( ... ) drivers/staging/speakup/speakup_soft.c:307:18: got long ( static [toplevel] *<nfile_operationsoident> )( ... ) drivers/staging/speakup/devsynth.c:29:41: warning: incorrect type in argument 2 (different address spaces) drivers/staging/speakup/devsynth.c:29:41: expected void const [noderef] <asn:1>*from drivers/staging/speakup/devsynth.c:29:41: got char const *ptr drivers/staging/speakup/devsynth.c:62:17: warning: incorrect type in initializer (incompatible argument 2 (different address spaces)) drivers/staging/speakup/devsynth.c:62:17: expected long ( *read )( ... ) drivers/staging/speakup/devsynth.c:62:17: got long ( static [toplevel] *<noident> )( ... ) drivers/staging/speakup/devsynth.c:63:18: warning: incorrect type in initializer (incompatible argument 2 (different address spaces)) drivers/staging/speakup/devsynth.c:63:18: expected long ( *write )( ... ) drivers/staging/speakup/devsynth.c:63:18: got long ( static [toplevel] *<noident> )( ... ) Signed-off-by: Emil Goode <emilgoode@gmail.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup/speakup_soft.c')
-rw-r--r--drivers/staging/speakup/speakup_soft.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/speakup/speakup_soft.c b/drivers/staging/speakup/speakup_soft.c
index 83e08455cd31..243c3d52fe5e 100644
--- a/drivers/staging/speakup/speakup_soft.c
+++ b/drivers/staging/speakup/speakup_soft.c
@@ -201,11 +201,11 @@ static int softsynth_close(struct inode *inode, struct file *fp)
return 0;
}
-static ssize_t softsynth_read(struct file *fp, char *buf, size_t count,
+static ssize_t softsynth_read(struct file *fp, char __user *buf, size_t count,
loff_t *pos)
{
int chars_sent = 0;
- char *cp;
+ char __user *cp;
char *init;
char ch;
int empty;
@@ -263,8 +263,8 @@ static ssize_t softsynth_read(struct file *fp, char *buf, size_t count,
static int last_index;
-static ssize_t softsynth_write(struct file *fp, const char *buf, size_t count,
- loff_t *pos)
+static ssize_t softsynth_write(struct file *fp, const char __user *buf,
+ size_t count, loff_t *pos)
{
unsigned long supplied_index = 0;
int converted;