diff options
author | Emil Goode <emilgoode@gmail.com> | 2012-04-24 00:36:29 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-24 11:01:46 -0700 |
commit | 78aee0fc9a2ee913ef8c524c380a72ee693dd6cb (patch) | |
tree | b25b8dc39d5356843ce917df3de9c1e730ec4ec4 | |
parent | a180c0d659f604568637336a00c0c3ca2f7b094a (diff) |
staging: android: binder: fix sparse warnings
Fix sparse warnings by adding __user annotation to stucts.
This patch fixes the the following sparse warnings:
drivers/staging/android/binder.c:1343:76: warning:
incorrect type in argument 2 (different address spaces)
drivers/staging/android/binder.c:1343:76:
expected void [noderef] <asn:1>*ptr
drivers/staging/android/binder.c:1343:76: got void *binder
drivers/staging/android/binder.c:1567:57: warning:
incorrect type in argument 2 (different address spaces)
drivers/staging/android/binder.c:1567:57:
expected void const [noderef] <asn:1>*from
drivers/staging/android/binder.c:1567:57:
got void const *buffer
drivers/staging/android/binder.c:1573:46: warning:
incorrect type in argument 2 (different address spaces)
drivers/staging/android/binder.c:1573:46:
expected void const [noderef] <asn:1>*from
drivers/staging/android/binder.c:1573:46:
got void const *offsets
drivers/staging/android/binder.c:1603:76: warning:
incorrect type in argument 2 (different address spaces)
drivers/staging/android/binder.c:1603:76:
expected void [noderef] <asn:1>*ptr
drivers/staging/android/binder.c:1603:76: got void *binder
drivers/staging/android/binder.c:1605:64: warning:
incorrect type in argument 2 (different address spaces)
drivers/staging/android/binder.c:1605:64:
expected void [noderef] <asn:1>*ptr
drivers/staging/android/binder.c:1605:64: got void *binder
drivers/staging/android/binder.c:1605:76: warning:
incorrect type in argument 3 (different address spaces)
drivers/staging/android/binder.c:1605:76:
expected void [noderef] <asn:1>*cookie
drivers/staging/android/binder.c:1605:76: got void *cookie
drivers/staging/android/binder.c:1613:40: error:
incompatible types in comparison
Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/android/binder.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/android/binder.h b/drivers/staging/android/binder.h index 6602474f41e..2f7d195d8b1 100644 --- a/drivers/staging/android/binder.h +++ b/drivers/staging/android/binder.h @@ -53,12 +53,12 @@ struct flat_binder_object { /* 8 bytes of data. */ union { - void *binder; /* local object */ + void __user *binder; /* local object */ signed long handle; /* remote object */ }; /* extra data associated with local object */ - void *cookie; + void __user *cookie; }; /* @@ -139,9 +139,9 @@ struct binder_transaction_data { union { struct { /* transaction data */ - const void *buffer; + const void __user *buffer; /* offsets from buffer to flat_binder_object structs */ - const void *offsets; + const void __user *offsets; } ptr; uint8_t buf[8]; } data; |