From 3db5540dfd889bc008db3ff2f868cce0f6fb2a04 Mon Sep 17 00:00:00 2001 From: Ken Cox Date: Thu, 22 May 2014 12:31:09 -0500 Subject: [PATCH] Staging: unisys: Fix sparse warnings Fix sparse warnings caused by incorrect references to IO space. Signed-off-by: Ken Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/unisys/uislib/uislib.c | 2 +- drivers/staging/unisys/visorchannel/visorchannel.h | 6 +++--- drivers/staging/unisys/visorchannel/visorchannel_funcs.c | 4 ++-- drivers/staging/unisys/visorutil/memregion.h | 2 +- drivers/staging/unisys/visorutil/memregion_direct.c | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c index 166a518a04f6..e3903ee72443 100644 --- a/drivers/staging/unisys/uislib/uislib.c +++ b/drivers/staging/unisys/uislib/uislib.c @@ -131,7 +131,7 @@ init_msg_header(CONTROLVM_MESSAGE *msg, U32 id, uint rsp, uint svr) static __iomem void * init_vbus_channel(U64 channelAddr, U32 channelBytes, int isServer) { - void *rc = NULL; + void __iomem *rc = NULL; void __iomem *pChan = uislib_ioremap_cache(channelAddr, channelBytes); if (!pChan) { LOGERR("CONTROLVM_BUS_CREATE error: ioremap_cache of channelAddr:%Lx for channelBytes:%llu failed", diff --git a/drivers/staging/unisys/visorchannel/visorchannel.h b/drivers/staging/unisys/visorchannel/visorchannel.h index a00dfb55c8d2..784f03a2ef6d 100644 --- a/drivers/staging/unisys/visorchannel/visorchannel.h +++ b/drivers/staging/unisys/visorchannel/visorchannel.h @@ -73,11 +73,11 @@ void visorchannel_debug(VISORCHANNEL *channel, int nQueues, struct seq_file *seq, U32 off); void visorchannel_dump_section(VISORCHANNEL *chan, char *s, int off, int len, struct seq_file *seq); -void *visorchannel_get_header(VISORCHANNEL *channel); +void __iomem *visorchannel_get_header(VISORCHANNEL *channel); #define VISORCHANNEL_CHANGE_SERVER_STATE(chan, chanId, newstate) \ do { \ - U8 *p = (U8 *)visorchannel_get_header(chan); \ + U8 *p = (U8 __iomem *)visorchannel_get_header(chan); \ if (p) { \ ULTRA_CHANNEL_SERVER_TRANSITION(p, chanId, SrvState, \ newstate, logCtx); \ @@ -92,7 +92,7 @@ void *visorchannel_get_header(VISORCHANNEL *channel); #define VISORCHANNEL_CHANGE_CLIENT_STATE(chan, chanId, newstate) \ do { \ - U8 *p = (U8 *)visorchannel_get_header(chan); \ + U8 *p = (U8 __iomem *)visorchannel_get_header(chan); \ if (p) { \ ULTRA_CHANNEL_CLIENT_TRANSITION(p, chanId, \ newstate, logCtx); \ diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c index bc4fc671a0b9..a44da7c84ae3 100644 --- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c +++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c @@ -279,10 +279,10 @@ Away: } EXPORT_SYMBOL_GPL(visorchannel_clear); -void * +void __iomem * visorchannel_get_header(VISORCHANNEL *channel) { - return (void *) &(channel->chan_hdr); + return (void __iomem *) &(channel->chan_hdr); } EXPORT_SYMBOL_GPL(visorchannel_get_header); diff --git a/drivers/staging/unisys/visorutil/memregion.h b/drivers/staging/unisys/visorutil/memregion.h index 796631652b77..f4a65d2fcf02 100644 --- a/drivers/staging/unisys/visorutil/memregion.h +++ b/drivers/staging/unisys/visorutil/memregion.h @@ -38,6 +38,6 @@ HOSTADDRESS visor_memregion_get_physaddr(MEMREGION *memregion); ulong visor_memregion_get_nbytes(MEMREGION *memregion); void memregion_dump(MEMREGION *memregion, char *s, ulong off, ulong len, struct seq_file *seq); -void *visor_memregion_get_pointer(MEMREGION *memregion); +void __iomem *visor_memregion_get_pointer(MEMREGION *memregion); #endif diff --git a/drivers/staging/unisys/visorutil/memregion_direct.c b/drivers/staging/unisys/visorutil/memregion_direct.c index d39fde9c1a60..28dfba0490f2 100644 --- a/drivers/staging/unisys/visorutil/memregion_direct.c +++ b/drivers/staging/unisys/visorutil/memregion_direct.c @@ -29,7 +29,7 @@ struct MEMREGION_Tag { HOSTADDRESS physaddr; ulong nbytes; - void *mapped; + void __iomem *mapped; BOOL requested; BOOL overlapped; }; @@ -93,7 +93,7 @@ visor_memregion_create_overlapped(MEMREGION *parent, ulong offset, ulong nbytes) memregion->physaddr = parent->physaddr + offset; memregion->nbytes = nbytes; - memregion->mapped = ((u8 *) (parent->mapped)) + offset; + memregion->mapped = ((u8 __iomem *) (parent->mapped)) + offset; memregion->requested = FALSE; memregion->overlapped = TRUE; return memregion; @@ -149,7 +149,7 @@ visor_memregion_get_nbytes(MEMREGION *memregion) } EXPORT_SYMBOL_GPL(visor_memregion_get_nbytes); -void * +void __iomem * visor_memregion_get_pointer(MEMREGION *memregion) { return memregion->mapped; -- 2.30.2