[PATCH] uml: sparse cleanups
misc sparse annotations Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
+6
-12
@@ -58,23 +58,17 @@ struct line {
|
||||
};
|
||||
|
||||
#define LINE_INIT(str, d) \
|
||||
{ init_str : str, \
|
||||
init_pri : INIT_STATIC, \
|
||||
valid : 1, \
|
||||
throttled : 0, \
|
||||
lock : SPIN_LOCK_UNLOCKED, \
|
||||
buffer : NULL, \
|
||||
head : NULL, \
|
||||
tail : NULL, \
|
||||
sigio : 0, \
|
||||
driver : d, \
|
||||
have_irq : 0 }
|
||||
{ .init_str = str, \
|
||||
.init_pri = INIT_STATIC, \
|
||||
.valid = 1, \
|
||||
.lock = SPIN_LOCK_UNLOCKED, \
|
||||
.driver = d }
|
||||
|
||||
struct lines {
|
||||
int num;
|
||||
};
|
||||
|
||||
#define LINES_INIT(n) { num : n }
|
||||
#define LINES_INIT(n) { .num = n }
|
||||
|
||||
extern void line_close(struct tty_struct *tty, struct file * filp);
|
||||
extern int line_open(struct line *lines, struct tty_struct *tty);
|
||||
|
||||
@@ -48,7 +48,8 @@ unsigned int csum_partial_copy_nocheck(const unsigned char *src, unsigned char *
|
||||
*/
|
||||
|
||||
static __inline__
|
||||
unsigned int csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst,
|
||||
unsigned int csum_partial_copy_from_user(const unsigned char __user *src,
|
||||
unsigned char *dst,
|
||||
int len, int sum, int *err_ptr)
|
||||
{
|
||||
if(copy_from_user(dst, src, len)){
|
||||
@@ -192,7 +193,7 @@ static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr,
|
||||
*/
|
||||
#define HAVE_CSUM_COPY_USER
|
||||
static __inline__ unsigned int csum_and_copy_to_user(const unsigned char *src,
|
||||
unsigned char *dst,
|
||||
unsigned char __user *dst,
|
||||
int len, int sum, int *err_ptr)
|
||||
{
|
||||
if (access_ok(VERIFY_WRITE, dst, len)){
|
||||
|
||||
Reference in New Issue
Block a user