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>
This commit is contained in:
parent
60e1741fc3
commit
e40d1c8ad9
3 changed files with 26 additions and 17 deletions
|
@ -333,8 +333,9 @@ ULTRA_check_channel_client(void __iomem *pChannel,
|
||||||
(pChannel))->Size) < expectedMinBytes) {
|
(pChannel))->Size) < expectedMinBytes) {
|
||||||
CHANNEL_U64_MISMATCH(expectedTypeGuid, channelName,
|
CHANNEL_U64_MISMATCH(expectedTypeGuid, channelName,
|
||||||
"size", expectedMinBytes,
|
"size", expectedMinBytes,
|
||||||
((CHANNEL_HEADER __iomem *)
|
readq(&((CHANNEL_HEADER __iomem *)
|
||||||
(pChannel))->Size, fileName,
|
(pChannel))->Size),
|
||||||
|
fileName,
|
||||||
lineNumber, logCtx);
|
lineNumber, logCtx);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -344,9 +345,9 @@ ULTRA_check_channel_client(void __iomem *pChannel,
|
||||||
!= expectedVersionId) {
|
!= expectedVersionId) {
|
||||||
CHANNEL_U32_MISMATCH(expectedTypeGuid, channelName,
|
CHANNEL_U32_MISMATCH(expectedTypeGuid, channelName,
|
||||||
"version", expectedVersionId,
|
"version", expectedVersionId,
|
||||||
((CHANNEL_HEADER __iomem *)
|
readl(&((CHANNEL_HEADER __iomem *)
|
||||||
(pChannel))->VersionId, fileName,
|
(pChannel))->VersionId),
|
||||||
lineNumber, logCtx);
|
fileName, lineNumber, logCtx);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (expectedSignature > 0) /* caller wants us to verify
|
if (expectedSignature > 0) /* caller wants us to verify
|
||||||
|
@ -355,8 +356,9 @@ ULTRA_check_channel_client(void __iomem *pChannel,
|
||||||
!= expectedSignature) {
|
!= expectedSignature) {
|
||||||
CHANNEL_U64_MISMATCH(expectedTypeGuid, channelName,
|
CHANNEL_U64_MISMATCH(expectedTypeGuid, channelName,
|
||||||
"signature", expectedSignature,
|
"signature", expectedSignature,
|
||||||
((CHANNEL_HEADER __iomem *)
|
readq(&((CHANNEL_HEADER __iomem *)
|
||||||
(pChannel))->Signature, fileName,
|
(pChannel))->Signature),
|
||||||
|
fileName,
|
||||||
lineNumber, logCtx);
|
lineNumber, logCtx);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,14 +194,21 @@ struct chaninfo {
|
||||||
* correctly at DEVICE_CREATE time, INSTEAD OF waiting until
|
* correctly at DEVICE_CREATE time, INSTEAD OF waiting until
|
||||||
* DEVICE_CONFIGURE time.
|
* DEVICE_CONFIGURE time.
|
||||||
*/
|
*/
|
||||||
#define WAIT_FOR_VALID_GUID(guid) \
|
static inline void
|
||||||
do { \
|
wait_for_valid_guid(uuid_le __iomem *guid)
|
||||||
while (uuid_le_cmp(guid, NULL_UUID_LE) == 0) { \
|
{
|
||||||
LOGERR("Waiting for non-0 GUID (why???)...\n"); \
|
uuid_le tmpguid;
|
||||||
UIS_THREAD_WAIT_SEC(5); \
|
|
||||||
} \
|
while (1) {
|
||||||
LOGERR("OK... GUID is non-0 now\n"); \
|
memcpy_fromio((void *)&tmpguid,
|
||||||
} while (0)
|
(void __iomem *)guid, sizeof(uuid_le));
|
||||||
|
if (uuid_le_cmp(tmpguid, NULL_UUID_LE) != 0)
|
||||||
|
break;
|
||||||
|
LOGERR("Waiting for non-0 GUID (why???)...\n");
|
||||||
|
UIS_THREAD_WAIT_SEC(5);
|
||||||
|
}
|
||||||
|
LOGERR("OK... GUID is non-0 now\n");
|
||||||
|
}
|
||||||
|
|
||||||
/* CopyFragsInfoFromSkb returns the number of entries added to frags array
|
/* CopyFragsInfoFromSkb returns the number of entries added to frags array
|
||||||
* Returns -1 on failure.
|
* Returns -1 on failure.
|
||||||
|
|
|
@ -447,7 +447,7 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
|
||||||
struct guest_msgs cmd;
|
struct guest_msgs cmd;
|
||||||
if (!uuid_le_cmp(dev->channelTypeGuid,
|
if (!uuid_le_cmp(dev->channelTypeGuid,
|
||||||
UltraVhbaChannelProtocolGuid)) {
|
UltraVhbaChannelProtocolGuid)) {
|
||||||
WAIT_FOR_VALID_GUID(((CHANNEL_HEADER
|
wait_for_valid_guid(&((CHANNEL_HEADER
|
||||||
__iomem *) (dev->
|
__iomem *) (dev->
|
||||||
chanptr))->
|
chanptr))->
|
||||||
Type);
|
Type);
|
||||||
|
@ -472,7 +472,7 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
|
||||||
} else
|
} else
|
||||||
if (!uuid_le_cmp(dev->channelTypeGuid,
|
if (!uuid_le_cmp(dev->channelTypeGuid,
|
||||||
UltraVnicChannelProtocolGuid)) {
|
UltraVnicChannelProtocolGuid)) {
|
||||||
WAIT_FOR_VALID_GUID(((CHANNEL_HEADER
|
wait_for_valid_guid(&((CHANNEL_HEADER
|
||||||
__iomem *) (dev->
|
__iomem *) (dev->
|
||||||
chanptr))->
|
chanptr))->
|
||||||
Type);
|
Type);
|
||||||
|
|
Loading…
Add table
Reference in a new issue