android_kernel_asus_sm8350/drivers/mailbox
Lee Jones a133f8b65d mailbox: mailbox-test: Correctly repair Sparse warnings
Kbuild test robot reported some Sparse warnings to the tune of:

  sparse: incorrect type in argument 6 (different address spaces)
    expected void const *buf
    got void [noderef] <asn:2>*mmio

This was due to passing variables tagged with the Sparse cookie
'__iomem' through into memcpy() and print_hex_dump() without
adequate protection or casting.  These issues were fixed in a
previous patch suppressing the warnings, but the issue is indeed
still present.

This patch fixes the warnings in the correct way, i.e. by using
the purposely authored memcpy_{from,to}io() derivatives in the
memcpy() case and casting the memory address to (void *) and
forcing Sparse to ignore to ignore it in the print_hex_dump()
case [NB: This is also what the memcpy() derivatives do].

Reported-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2015-10-23 11:19:21 +05:30
..
arm_mhu.c Merge branch 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration 2015-09-05 18:11:04 -07:00
bcm2835-mailbox.c mailbox: Drop owner assignment from platform_driver 2015-08-05 17:20:53 +05:30
Kconfig mailbox: Add generic mechanism for testing Mailbox Controllers 2015-10-17 10:36:56 +05:30
mailbox-altera.c mailbox: Make mbox_chan_ops const 2015-05-12 09:18:16 +05:30
mailbox-sti.c mailbox: Fix a couple of trivial static checker issues 2015-10-17 10:36:56 +05:30
mailbox-test.c mailbox: mailbox-test: Correctly repair Sparse warnings 2015-10-23 11:19:21 +05:30
mailbox.c mailbox: switch to hrtimer for tx_complete polling 2015-08-10 14:29:27 +05:30
mailbox.h Mailbox: Add support for Platform Communication Channel 2014-11-27 12:51:09 +05:30
Makefile mailbox: Add generic mechanism for testing Mailbox Controllers 2015-10-17 10:36:56 +05:30
omap-mailbox.c mailbox: Fix up error handling in mbox_request_channel() 2015-05-12 09:18:21 +05:30
pcc.c PCC: fix dereference of ERR_PTR 2015-10-16 10:46:07 +05:30
pl320-ipc.c arm: use subsys_initcall in non-modular pl320 IPC code 2015-06-16 14:12:35 -04:00