[PATCH v2] staging: gasket: Fix sparse "incorrect type in assignment" warnings.

From: Laurence Rochfort
Date: Thu Oct 04 2018 - 13:42:26 EST


Correct the coherent buffer data type and memory space cookie.

sparse errors were being generated when passing virt_base to
dma_alloc_coherent().

warning: incorrect type in assignment (different address spaces)
expected unsigned char [noderef] [usertype] <asn:2>*virt_base
got void *[assigned] mem
warning: incorrect type in argument 3 (different address spaces)
expected void *cpu_addr
got unsigned char [noderef] [usertype] <asn:2>*virt_base

Signed-off-by: Laurence Rochfort <laurence.rochfort@xxxxxxxxx>
---
Changes in v2:
- Correct data type rather than forcing type coersion, as per gkh

drivers/staging/gasket/gasket_core.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/gasket/gasket_core.h b/drivers/staging/gasket/gasket_core.h
index 275fd0b..9d09678 100644
--- a/drivers/staging/gasket/gasket_core.h
+++ b/drivers/staging/gasket/gasket_core.h
@@ -231,7 +231,7 @@ struct gasket_coherent_buffer_desc {
/* Coherent buffer structure. */
struct gasket_coherent_buffer {
/* Virtual base address. */
- u8 __iomem *virt_base;
+ void *virt_base;

/* Physical base address. */
ulong phys_base;
--
2.9.5


--ADZbWkCsHQ7r3kzd--