Staging: unisys: Fix sparse warnings
authorKen Cox <jkc@redhat.com>
Thu, 22 May 2014 17:31:09 +0000 (12:31 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 May 2014 11:21:10 +0000 (20:21 +0900)
Fix sparse warnings caused by incorrect references to IO space.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/uislib/uislib.c
drivers/staging/unisys/visorchannel/visorchannel.h
drivers/staging/unisys/visorchannel/visorchannel_funcs.c
drivers/staging/unisys/visorutil/memregion.h
drivers/staging/unisys/visorutil/memregion_direct.c

index 166a518a04f6a758bd0d2e58e7332868466b148b..e3903ee72443e58122804259a4a825991b83c7a7 100644 (file)
@@ -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",
index a00dfb55c8d20ddd66e948f2077a7498dab838ab..784f03a2ef6dcda3868ba24c15522cddc69ba99b 100644 (file)
@@ -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); \
index bc4fc671a0b917106fd3e6c5f12ebe97635e1c1e..a44da7c84ae396c00707fd2045cb056d0a5f53d5 100644 (file)
@@ -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);
 
index 796631652b7715c4923cb0d2afd32b5c5ba929e0..f4a65d2fcf0274e40d39de3f938b283aec169d7d 100644 (file)
@@ -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
index d39fde9c1a6033cc31b4a260ae966f7c89b2f4e2..28dfba0490f2e3c0d26576c377fcceca9c0891a5 100644 (file)
@@ -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;