summaryrefslogtreecommitdiff
path: root/drivers/staging/unisys/common-spar
diff options
context:
space:
mode:
authorKen Cox <jkc@redhat.com>2014-05-22 12:31:13 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-23 20:21:10 +0900
commite40d1c8ad91420a2224f557e5b4c43c5c4148847 (patch)
tree1d74ab32662aa706400c9ae1d879e9ed2c77620d /drivers/staging/unisys/common-spar
parent60e1741fc30719171c81030b6f50f6838fc5fd30 (diff)
Staging: unisys: Fixup sparse warnings for dereferencing noderef types.
Fixed the usage of the following so they don't try to dereference pointers to iomem. CHANNEL_U64_MISMATCH CHANNEL_U32_MISMATCH wait_for_valid_guid Signed-off-by: Ken Cox <jkc@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/common-spar')
-rw-r--r--drivers/staging/unisys/common-spar/include/channels/channel.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/staging/unisys/common-spar/include/channels/channel.h b/drivers/staging/unisys/common-spar/include/channels/channel.h
index 237a852c2fc0..d19711de1140 100644
--- a/drivers/staging/unisys/common-spar/include/channels/channel.h
+++ b/drivers/staging/unisys/common-spar/include/channels/channel.h
@@ -333,8 +333,9 @@ ULTRA_check_channel_client(void __iomem *pChannel,
(pChannel))->Size) < expectedMinBytes) {
CHANNEL_U64_MISMATCH(expectedTypeGuid, channelName,
"size", expectedMinBytes,
- ((CHANNEL_HEADER __iomem *)
- (pChannel))->Size, fileName,
+ readq(&((CHANNEL_HEADER __iomem *)
+ (pChannel))->Size),
+ fileName,
lineNumber, logCtx);
return 0;
}
@@ -344,9 +345,9 @@ ULTRA_check_channel_client(void __iomem *pChannel,
!= expectedVersionId) {
CHANNEL_U32_MISMATCH(expectedTypeGuid, channelName,
"version", expectedVersionId,
- ((CHANNEL_HEADER __iomem *)
- (pChannel))->VersionId, fileName,
- lineNumber, logCtx);
+ readl(&((CHANNEL_HEADER __iomem *)
+ (pChannel))->VersionId),
+ fileName, lineNumber, logCtx);
return 0;
}
if (expectedSignature > 0) /* caller wants us to verify
@@ -355,8 +356,9 @@ ULTRA_check_channel_client(void __iomem *pChannel,
!= expectedSignature) {
CHANNEL_U64_MISMATCH(expectedTypeGuid, channelName,
"signature", expectedSignature,
- ((CHANNEL_HEADER __iomem *)
- (pChannel))->Signature, fileName,
+ readq(&((CHANNEL_HEADER __iomem *)
+ (pChannel))->Signature),
+ fileName,
lineNumber, logCtx);
return 0;
}