UPSTREAM: binder: fix sparse issue in binder_alloc_selftest.c
authorTodd Kjos <tkjos@android.com>
Wed, 13 Feb 2019 19:48:53 +0000 (11:48 -0800)
committerTodd Kjos <tkjos@google.com>
Mon, 25 Mar 2019 22:19:46 +0000 (15:19 -0700)
commit91bfaa07a2897825be8b5c2004abac596767f5d8
tree900dbc9302e15e15388de79f2605e50be9b4acd4
parent9fcfd1ec697b3c49fa08adeda15136d1de112b33
UPSTREAM: binder: fix sparse issue in binder_alloc_selftest.c

Fixes sparse issues reported by the kbuild test robot running
on https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
char-misc-testing: bde4a19fc04f5 ("binder: use userspace pointer as base
of buffer space")

Error output (drivers/android/binder_alloc_selftest.c):
sparse: warning: incorrect type in assignment (different address spaces)
sparse:    expected void *page_addr
sparse:    got void [noderef] <asn:1> *user_data
sparse: error: subtraction of different types can't work

Fixed by adding necessary "__user" tags.

(cherry pick from commit 36f30937922ce75390c73f99e650e4f2eb56b0e6)
Bug: 67668716
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: Ia0a16d163251381d4bc04f46a44dddbc18b10a85
drivers/android/binder_alloc_selftest.c