diff options
| author | 2014-09-12 10:48:33 +0100 | |
|---|---|---|
| committer | 2014-09-19 16:08:09 -0700 | |
| commit | 635ecc5f36438cdf8cf3b88421321ee7443eb2d1 (patch) | |
| tree | f5dd2d6d7d07966bc30dd9611626223e25375a1f | |
| parent | staging: et131x: logical continuations should be on the previous line (diff) | |
staging: unisys: Fix sparse error - accessing __iomem directly
Copy the channel type into a temporary buffer so that code will work
for architectures that don't support MMIO. This now works in same way
as other tests in same function.
Signed-off-by: Luke Hart <luke.hart@birchleys.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/unisys/common-spar/include/channels/channel.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/staging/unisys/common-spar/include/channels/channel.h b/drivers/staging/unisys/common-spar/include/channels/channel.h index 2004cfe1890d..5ba5e566be9a 100644 --- a/drivers/staging/unisys/common-spar/include/channels/channel.h +++ b/drivers/staging/unisys/common-spar/include/channels/channel.h @@ -347,10 +347,13 @@ ULTRA_check_channel_client(void __iomem *pChannel, u64 expectedSignature, char *fileName, int lineNumber, void *logCtx) { - if (uuid_le_cmp(expectedTypeGuid, NULL_UUID_LE) != 0) + if (uuid_le_cmp(expectedTypeGuid, NULL_UUID_LE) != 0) { + uuid_le guid; + + ioread8_rep(&((CHANNEL_HEADER __iomem *)(pChannel))->Type, + &guid, sizeof(guid)); /* caller wants us to verify type GUID */ - if (uuid_le_cmp((((CHANNEL_HEADER __iomem *)(pChannel))->Type), - expectedTypeGuid) != 0) { + if (uuid_le_cmp(guid, expectedTypeGuid) != 0) { CHANNEL_GUID_MISMATCH(expectedTypeGuid, channelName, "type", expectedTypeGuid, ((CHANNEL_HEADER __iomem *) @@ -358,6 +361,7 @@ ULTRA_check_channel_client(void __iomem *pChannel, lineNumber, logCtx); return 0; } + } if (expectedMinBytes > 0) /* caller wants us to verify * channel size */ if (readq(&((CHANNEL_HEADER __iomem *) |
