mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
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>
This commit is contained in:
parent
a180c0d659
commit
78aee0fc9a
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue