提交 94299171 编写于 作者: A Al Viro 提交者: Linus Torvalds

[PATCH] dst_ca __user annotations, portability fixes

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 b3e5b5b2
...@@ -406,7 +406,7 @@ static int ca_send_message(struct dst_state *state, struct ca_msg *p_ca_message, ...@@ -406,7 +406,7 @@ static int ca_send_message(struct dst_state *state, struct ca_msg *p_ca_message,
} }
dprintk(verbose, DST_CA_DEBUG, 1, " "); dprintk(verbose, DST_CA_DEBUG, 1, " ");
if (copy_from_user(p_ca_message, (void *)arg, sizeof (struct ca_msg))) { if (copy_from_user(p_ca_message, arg, sizeof (struct ca_msg))) {
result = -EFAULT; result = -EFAULT;
goto free_mem_and_exit; goto free_mem_and_exit;
} }
...@@ -579,7 +579,7 @@ static int dst_ca_release(struct inode *inode, struct file *file) ...@@ -579,7 +579,7 @@ static int dst_ca_release(struct inode *inode, struct file *file)
return 0; return 0;
} }
static int dst_ca_read(struct file *file, char __user *buffer, size_t length, loff_t *offset) static ssize_t dst_ca_read(struct file *file, char __user *buffer, size_t length, loff_t *offset)
{ {
int bytes_read = 0; int bytes_read = 0;
...@@ -588,7 +588,7 @@ static int dst_ca_read(struct file *file, char __user *buffer, size_t length, lo ...@@ -588,7 +588,7 @@ static int dst_ca_read(struct file *file, char __user *buffer, size_t length, lo
return bytes_read; return bytes_read;
} }
static int dst_ca_write(struct file *file, const char __user *buffer, size_t length, loff_t *offset) static ssize_t dst_ca_write(struct file *file, const char __user *buffer, size_t length, loff_t *offset)
{ {
dprintk(verbose, DST_CA_DEBUG, 1, " Device write."); dprintk(verbose, DST_CA_DEBUG, 1, " Device write.");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册