Commit 635ecc5f authored by Luke Hart's avatar Luke Hart Committed by Greg Kroah-Hartman

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: default avatarLuke Hart <luke.hart@birchleys.eu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cec78b98
...@@ -347,10 +347,13 @@ ULTRA_check_channel_client(void __iomem *pChannel, ...@@ -347,10 +347,13 @@ ULTRA_check_channel_client(void __iomem *pChannel,
u64 expectedSignature, u64 expectedSignature,
char *fileName, int lineNumber, void *logCtx) 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 */ /* caller wants us to verify type GUID */
if (uuid_le_cmp((((CHANNEL_HEADER __iomem *)(pChannel))->Type), if (uuid_le_cmp(guid, expectedTypeGuid) != 0) {
expectedTypeGuid) != 0) {
CHANNEL_GUID_MISMATCH(expectedTypeGuid, channelName, CHANNEL_GUID_MISMATCH(expectedTypeGuid, channelName,
"type", expectedTypeGuid, "type", expectedTypeGuid,
((CHANNEL_HEADER __iomem *) ((CHANNEL_HEADER __iomem *)
...@@ -358,6 +361,7 @@ ULTRA_check_channel_client(void __iomem *pChannel, ...@@ -358,6 +361,7 @@ ULTRA_check_channel_client(void __iomem *pChannel,
lineNumber, logCtx); lineNumber, logCtx);
return 0; return 0;
} }
}
if (expectedMinBytes > 0) /* caller wants us to verify if (expectedMinBytes > 0) /* caller wants us to verify
* channel size */ * channel size */
if (readq(&((CHANNEL_HEADER __iomem *) if (readq(&((CHANNEL_HEADER __iomem *)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment