Staging: unisys: Fix noderef sparse warnings in vbusdeviceinfo.h
authorKen Cox <jkc@redhat.com>
Thu, 3 Jul 2014 15:02:18 +0000 (10:02 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jul 2014 22:38:47 +0000 (15:38 -0700)
vbuschannel_devinfo_to_string() was declared with the devinfo argument
as a pointer to __iomem space.  No callers of this function need the
__iomem space, so I removed that constraint.

Same thing goes for vbuschannel_sanitize_buffer().  It doesn't need to
operate on I/O space.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/common-spar/include/vbusdeviceinfo.h

index 71648680c5ff2ae4d64bf481cd672d9adb923bcb..45e311cdf8defcbc8b6badc01a034518e30bf050 100644 (file)
@@ -50,12 +50,12 @@ typedef struct _ULTRA_VBUS_DEVICEINFO {
  * to a buffer at <p>, had it been infinitely big.
  */
 static inline int
-vbuschannel_sanitize_buffer(char *p, int remain, char __iomem *src, int srcmax)
+vbuschannel_sanitize_buffer(char *p, int remain, char *src, int srcmax)
 {
        int chars = 0;
        int nonprintable_streak = 0;
        while (srcmax > 0) {
-               if ((readb(src) >= ' ') && (readb(src) < 0x7f)) {
+               if ((*src >= ' ') && (*src < 0x7f)) {
                        if (nonprintable_streak) {
                                if (remain > 0) {
                                        *p = ' ';
@@ -67,7 +67,7 @@ vbuschannel_sanitize_buffer(char *p, int remain, char __iomem *src, int srcmax)
                                nonprintable_streak = 0;
                        }
                        if (remain > 0) {
-                               *p = readb(src);
+                               *p = *src;
                                p++;
                                remain--;
                                chars++;
@@ -146,10 +146,10 @@ vbuschannel_itoa(char *p, int remain, int num)
  * Returns the number of bytes written to <p>.
  */
 static inline int
-vbuschannel_devinfo_to_string(ULTRA_VBUS_DEVICEINFO __iomem *devinfo,
+vbuschannel_devinfo_to_string(ULTRA_VBUS_DEVICEINFO *devinfo,
                                  char *p, int remain, int devix)
 {
-       char __iomem *psrc;
+       char *psrc;
        int nsrc, x, i, pad;
        int chars = 0;