[PATCH 17/91] staging: unisys: fix CamelCase names in struct channel_header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix CamelCase names:
Signature => signature
LegacySignature => legacy_signature
HeaderSize => header_size
Size => size
Features => features
Type => chtype
PartitionHandle => partition_handle
Handle => handle
oChannelSpace => ch_space_offset
VersionId => version_id
PartitionIndex => partition_index
ZoneGuid => zone_uuid
oClientString => cli_str_offset
CliStateBoot => cli_state_boot
CmdStateCli => cmd_state_cli
CliStateOs => cli_state_os
ChannelCharacteristics => ch_characteristic
CmdStateSrv => cmd_state_srv
srvState => srv_state
CliErrorBoot => cli_error_boot
CliErrorOs => cli_error_os
Filler => filler
RecoverChannel => recover_channel

Signed-off-by: Benjamin Romer <benjamin.romer@xxxxxxxxxx>
---
 drivers/staging/unisys/channels/channel.c          |   8 +-
 .../unisys/common-spar/include/channels/channel.h  | 135 ++++++++++-----------
 .../common-spar/include/channels/iochannel.h       |  40 +++---
 drivers/staging/unisys/uislib/uislib.c             |   4 +-
 drivers/staging/unisys/virthba/virthba.c           |  16 +--
 .../unisys/visorchannel/visorchannel_funcs.c       |  50 ++++----
 6 files changed, 126 insertions(+), 127 deletions(-)

diff --git a/drivers/staging/unisys/channels/channel.c b/drivers/staging/unisys/channels/channel.c
index 2033b3b..c2f95f3 100644
--- a/drivers/staging/unisys/channels/channel.c
+++ b/drivers/staging/unisys/channels/channel.c
@@ -52,7 +52,7 @@ visor_signal_insert(struct channel_header __iomem *pChannel, u32 Queue,
 
 	SIGNAL_QUEUE_HEADER __iomem *pqhdr =
 	    (SIGNAL_QUEUE_HEADER __iomem *)
-		((char __iomem *) pChannel + readq(&pChannel->oChannelSpace))
+		((char __iomem *) pChannel + readq(&pChannel->ch_space_offset))
 		+ Queue;
 
 	/* capture current head and tail */
@@ -110,7 +110,7 @@ visor_signal_remove(struct channel_header __iomem *pChannel, u32 Queue,
 	unsigned int head, tail;
 	SIGNAL_QUEUE_HEADER __iomem *pqhdr =
 	    (SIGNAL_QUEUE_HEADER __iomem *) ((char __iomem *) pChannel +
-				    readq(&pChannel->oChannelSpace)) + Queue;
+				    readq(&pChannel->ch_space_offset)) + Queue;
 
 	/* capture current head and tail */
 	head = readl(&pqhdr->Head);
@@ -165,7 +165,7 @@ SignalRemoveAll(struct channel_header *pChannel, u32 Queue, void *pSignal)
 	unsigned int head, tail, signalCount = 0;
 	pSIGNAL_QUEUE_HEADER pqhdr =
 	    (pSIGNAL_QUEUE_HEADER) ((char *) pChannel +
-				    pChannel->oChannelSpace) + Queue;
+				    pChannel->ch_space_offset) + Queue;
 
 	/* capture current head and tail */
 	head = pqhdr->Head;
@@ -214,7 +214,7 @@ visor_signalqueue_empty(struct channel_header __iomem *pChannel, u32 Queue)
 {
 	SIGNAL_QUEUE_HEADER __iomem *pqhdr =
 	    (SIGNAL_QUEUE_HEADER __iomem *) ((char __iomem *) pChannel +
-				    readq(&pChannel->oChannelSpace)) + Queue;
+				    readq(&pChannel->ch_space_offset)) + Queue;
 	return readl(&pqhdr->Head) == readl(&pqhdr->Tail);
 }
 EXPORT_SYMBOL_GPL(visor_signalqueue_empty);
diff --git a/drivers/staging/unisys/common-spar/include/channels/channel.h b/drivers/staging/unisys/common-spar/include/channels/channel.h
index a71bac0..dafb14d 100644
--- a/drivers/staging/unisys/common-spar/include/channels/channel.h
+++ b/drivers/staging/unisys/common-spar/include/channels/channel.h
@@ -95,7 +95,7 @@ ULTRA_CHANNELCLI_STRING(u32 v)
 
 #define ULTRA_CHANNELSRV_IS_READY(x)     ((x) == CHANNELSRV_READY)
 #define ULTRA_CHANNEL_SERVER_READY(pChannel) \
-	(ULTRA_CHANNELSRV_IS_READY(readl(&(pChannel)->SrvState)))
+	(ULTRA_CHANNELSRV_IS_READY(readl(&(pChannel)->srv_state)))
 
 #define ULTRA_VALID_CHANNELCLI_TRANSITION(o, n)				\
 	(((((o) == CHANNELCLI_DETACHED) && ((n) == CHANNELCLI_DISABLED)) || \
@@ -134,21 +134,21 @@ ULTRA_CHANNELCLI_STRING(u32 v)
 	do {								\
 		ULTRA_CHANNEL_CLIENT_CHK_TRANSITION(			\
 			readl(&(((struct channel_header __iomem *) \
-				 (pChan))->CliStateOS)),		\
+				 (pChan))->cli_state_os)),		\
 			newstate,					\
 			chanId, logCtx, __FILE__, __LINE__);		\
 			pr_info("%s Channel StateTransition (%s) %s(%d)-->%s(%d) @%s:%d\n", \
 				chanId, "CliStateOS",			\
 				ULTRA_CHANNELCLI_STRING( \
 				      readl(&((struct channel_header __iomem *)\
-					      (pChan))->CliStateOS)),	\
+					      (pChan))->cli_state_os)),	\
 				readl(&((struct channel_header __iomem *) \
-				      (pChan))->CliStateOS),		\
+				      (pChan))->cli_state_os),		\
 				ULTRA_CHANNELCLI_STRING(newstate),	\
 				newstate,				\
 				PathName_Last_N_Nodes(__FILE__, 4), __LINE__); \
 		writel(newstate, &((struct channel_header __iomem *) \
-				   (pChan))->CliStateOS);		\
+				   (pChan))->cli_state_os);		\
 		mb(); /* required for channel synch */			\
 	} while (0)
 
@@ -201,43 +201,43 @@ ULTRA_CHANNELCLI_STRING(u32 v)
 #pragma pack(push, 1)		/* both GCC and VC now allow this pragma */
 /* Common Channel Header */
 struct channel_header {
-	u64 Signature;		/* Signature */
-	u32 LegacyState;	/* DEPRECATED - being replaced by */
+	u64 signature;		/* Signature */
+	u32 legacy_state;	/* DEPRECATED - being replaced by */
 	/* /              SrvState, CliStateBoot, and CliStateOS below */
-	u32 HeaderSize;		/* sizeof(struct channel_header) */
-	u64 Size;		/* Total size of this channel in bytes */
-	u64 Features;		/* Flags to modify behavior */
-	uuid_le Type;		/* Channel type: data, bus, control, etc. */
-	u64 PartitionHandle;	/* ID of guest partition */
-	u64 Handle;		/* Device number of this channel in client */
-	u64 oChannelSpace;	/* Offset in bytes to channel specific area */
-	u32 VersionId;		/* struct channel_header Version ID */
-	u32 PartitionIndex;	/* Index of guest partition */
-	uuid_le ZoneGuid;		/* Guid of Channel's zone */
-	u32 oClientString;	/* offset from channel header to
+	u32 header_size;	/* sizeof(struct channel_header) */
+	u64 size;		/* Total size of this channel in bytes */
+	u64 features;		/* Flags to modify behavior */
+	uuid_le chtype;		/* Channel type: data, bus, control, etc. */
+	u64 partition_handle;	/* ID of guest partition */
+	u64 handle;		/* Device number of this channel in client */
+	u64 ch_space_offset;	/* Offset in bytes to channel specific area */
+	u32 version_id;		/* struct channel_header Version ID */
+	u32 partition_index;	/* Index of guest partition */
+	uuid_le zone_uuid;	/* Guid of Channel's zone */
+	u32 cli_str_offset;	/* offset from channel header to
 				 * nul-terminated ClientString (0 if
 				 * ClientString not present) */
-	u32 CliStateBoot;	/* CHANNEL_CLIENTSTATE of pre-boot
+	u32 cli_state_boot;	/* CHANNEL_CLIENTSTATE of pre-boot
 				 * EFI client of this channel */
-	u32 CmdStateCli;	/* CHANNEL_COMMANDSTATE (overloaded in
+	u32 cmd_state_cli;	/* CHANNEL_COMMANDSTATE (overloaded in
 				 * Windows drivers, see ServerStateUp,
 				 * ServerStateDown, etc) */
-	u32 CliStateOS;		/* CHANNEL_CLIENTSTATE of Guest OS
+	u32 cli_state_os;	/* CHANNEL_CLIENTSTATE of Guest OS
 				 * client of this channel */
-	u32 ChannelCharacteristics;	/* CHANNEL_CHARACTERISTIC_<xxx> */
-	u32 CmdStateSrv;	/* CHANNEL_COMMANDSTATE (overloaded in
+	u32 ch_characteristic;	/* CHANNEL_CHARACTERISTIC_<xxx> */
+	u32 cmd_state_srv;	/* CHANNEL_COMMANDSTATE (overloaded in
 				 * Windows drivers, see ServerStateUp,
 				 * ServerStateDown, etc) */
-	u32 SrvState;		/* CHANNEL_SERVERSTATE */
-	u8 CliErrorBoot;	/* bits to indicate err states for
+	u32 srv_state;		/* CHANNEL_SERVERSTATE */
+	u8 cli_error_boot;	/* bits to indicate err states for
 				 * boot clients, so err messages can
 				 * be throttled */
-	u8 CliErrorOS;		/* bits to indicate err states for OS
+	u8 cli_error_os;	/* bits to indicate err states for OS
 				 * clients, so err messages can be
 				 * throttled */
-	u8 Filler[1];		/* Pad out to 128 byte cacheline */
+	u8 filler[1];		/* Pad out to 128 byte cacheline */
 	/* Please add all new single-byte values below here */
-	u8 RecoverChannel;
+	u8 recover_channel;
 };
 
 #define ULTRA_CHANNEL_ENABLE_INTS (0x1ULL << 0)
@@ -312,9 +312,8 @@ ULTRA_check_channel_client(void __iomem *pChannel,
 		uuid_le guid;
 
 		memcpy_fromio(&guid,
-			      &((struct channel_header __iomem *)
-					(pChannel))->Type,
-			      sizeof(guid));
+			&((struct channel_header __iomem *)(pChannel))->chtype,
+			sizeof(guid));
 		/* caller wants us to verify type GUID */
 		if (uuid_le_cmp(guid, expectedTypeGuid) != 0) {
 			pr_err("Channel mismatch on channel=%s(%pUL) field=type expected=%pUL actual=%pUL\n",
@@ -327,7 +326,7 @@ ULTRA_check_channel_client(void __iomem *pChannel,
 					 * channel size */
 		unsigned long long bytes =
 				readq(&((struct channel_header __iomem *)
-					(pChannel))->Size);
+					(pChannel))->size);
 		if (bytes < expectedMinBytes) {
 			pr_err("Channel mismatch on channel=%s(%pUL) field=size expected=0x%-8.8Lx actual=0x%-8.8Lx\n",
 			       channelName, &expectedTypeGuid,
@@ -338,7 +337,7 @@ ULTRA_check_channel_client(void __iomem *pChannel,
 	if (expectedVersionId > 0) {	/* caller wants us to verify
 					 * channel version */
 		unsigned long ver = readl(&((struct channel_header __iomem *)
-				    (pChannel))->VersionId);
+				    (pChannel))->version_id);
 		if (ver != expectedVersionId) {
 			pr_err("Channel mismatch on channel=%s(%pUL) field=version expected=0x%-8.8lx actual=0x%-8.8lx\n",
 			       channelName, &expectedTypeGuid,
@@ -350,7 +349,7 @@ ULTRA_check_channel_client(void __iomem *pChannel,
 					 * channel signature */
 		unsigned long long sig =
 				readq(&((struct channel_header __iomem *)
-					(pChannel))->Signature);
+					(pChannel))->signature);
 		if (sig != expectedSignature) {
 			pr_err("Channel mismatch on channel=%s(%pUL) field=signature expected=0x%-8.8llx actual=0x%-8.8llx\n",
 			       channelName, &expectedTypeGuid,
@@ -421,13 +420,13 @@ ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId,
 {
 	struct channel_header __iomem *pChan = pChannel;
 
-	if (readl(&pChan->CliStateOS) == CHANNELCLI_DISABLED) {
-		if ((readb(&pChan->CliErrorOS)
+	if (readl(&pChan->cli_state_os) == CHANNELCLI_DISABLED) {
+		if ((readb(&pChan->cli_error_os)
 		     & ULTRA_CLIERROROS_THROTTLEMSG_DISABLED) == 0) {
 			/* we are NOT throttling this message */
-			writeb(readb(&pChan->CliErrorOS) |
+			writeb(readb(&pChan->cli_error_os) |
 			       ULTRA_CLIERROROS_THROTTLEMSG_DISABLED,
-			       &pChan->CliErrorOS);
+			       &pChan->cli_error_os);
 			/* throttle until acquire successful */
 
 			pr_info("%s Channel StateTransition INVALID! - acquire failed because OS client DISABLED @%s:%d\n",
@@ -436,27 +435,27 @@ ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId,
 		}
 		return 0;
 	}
-	if ((readl(&pChan->CliStateOS) != CHANNELCLI_OWNED)
-	    && (readl(&pChan->CliStateBoot) == CHANNELCLI_DISABLED)) {
+	if ((readl(&pChan->cli_state_os) != CHANNELCLI_OWNED)
+	    && (readl(&pChan->cli_state_boot) == CHANNELCLI_DISABLED)) {
 		/* Our competitor is DISABLED, so we can transition to OWNED */
 		pr_info("%s Channel StateTransition (%s) %s(%d)-->%s(%d) @%s:%d\n",
-			chanId, "CliStateOS",
-			ULTRA_CHANNELCLI_STRING(readl(&pChan->CliStateOS)),
-			readl(&pChan->CliStateOS),
+			chanId, "cli_state_os",
+			ULTRA_CHANNELCLI_STRING(readl(&pChan->cli_state_os)),
+			readl(&pChan->cli_state_os),
 			ULTRA_CHANNELCLI_STRING(CHANNELCLI_OWNED),
 			CHANNELCLI_OWNED,
 			PathName_Last_N_Nodes((u8 *) file, 4), line);
-		writel(CHANNELCLI_OWNED, &pChan->CliStateOS);
+		writel(CHANNELCLI_OWNED, &pChan->cli_state_os);
 		mb(); /* required for channel synch */
 	}
-	if (readl(&pChan->CliStateOS) == CHANNELCLI_OWNED) {
-		if (readb(&pChan->CliErrorOS) != 0) {
+	if (readl(&pChan->cli_state_os) == CHANNELCLI_OWNED) {
+		if (readb(&pChan->cli_error_os) != 0) {
 			/* we are in an error msg throttling state;
 			 * come out of it */
 			pr_info("%s Channel OS client acquire now successful @%s:%d\n",
 				chanId, PathName_Last_N_Nodes((u8 *) file, 4),
 				line);
-			writeb(0, &pChan->CliErrorOS);
+			writeb(0, &pChan->cli_error_os);
 		}
 		return 1;
 	}
@@ -464,48 +463,48 @@ ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId,
 	/* We have to do it the "hard way".  We transition to BUSY,
 	* and can use the channel iff our competitor has not also
 	* transitioned to BUSY. */
-	if (readl(&pChan->CliStateOS) != CHANNELCLI_ATTACHED) {
-		if ((readb(&pChan->CliErrorOS)
+	if (readl(&pChan->cli_state_os) != CHANNELCLI_ATTACHED) {
+		if ((readb(&pChan->cli_error_os)
 		     & ULTRA_CLIERROROS_THROTTLEMSG_NOTATTACHED) == 0) {
 			/* we are NOT throttling this message */
-			writeb(readb(&pChan->CliErrorOS) |
+			writeb(readb(&pChan->cli_error_os) |
 			       ULTRA_CLIERROROS_THROTTLEMSG_NOTATTACHED,
-			       &pChan->CliErrorOS);
+			       &pChan->cli_error_os);
 			/* throttle until acquire successful */
 			pr_info("%s Channel StateTransition INVALID! - acquire failed because OS client NOT ATTACHED (state=%s(%d)) @%s:%d\n",
 				chanId, ULTRA_CHANNELCLI_STRING(
-						readl(&pChan->CliStateOS)),
-				readl(&pChan->CliStateOS),
+						readl(&pChan->cli_state_os)),
+				readl(&pChan->cli_state_os),
 				PathName_Last_N_Nodes((u8 *) file, 4),
 				line);
 		}
 		return 0;
 	}
-	writel(CHANNELCLI_BUSY, &pChan->CliStateOS);
+	writel(CHANNELCLI_BUSY, &pChan->cli_state_os);
 	mb(); /* required for channel synch */
-	if (readl(&pChan->CliStateBoot) == CHANNELCLI_BUSY) {
-		if ((readb(&pChan->CliErrorOS)
+	if (readl(&pChan->cli_state_boot) == CHANNELCLI_BUSY) {
+		if ((readb(&pChan->cli_error_os)
 		     & ULTRA_CLIERROROS_THROTTLEMSG_BUSY) == 0) {
 			/* we are NOT throttling this message */
-			writeb(readb(&pChan->CliErrorOS) |
+			writeb(readb(&pChan->cli_error_os) |
 			       ULTRA_CLIERROROS_THROTTLEMSG_BUSY,
-			       &pChan->CliErrorOS);
+			       &pChan->cli_error_os);
 			/* throttle until acquire successful */
 			pr_info("%s Channel StateTransition failed - host OS acquire failed because boot BUSY @%s:%d\n",
 				chanId, PathName_Last_N_Nodes((u8 *) file, 4),
 				line);
 		}
 		/* reset busy */
-		writel(CHANNELCLI_ATTACHED, &pChan->CliStateOS);
+		writel(CHANNELCLI_ATTACHED, &pChan->cli_state_os);
 		mb(); /* required for channel synch */
 		return 0;
 	}
-	if (readb(&pChan->CliErrorOS) != 0) {
+	if (readb(&pChan->cli_error_os) != 0) {
 		/* we are in an error msg throttling state; come out of it */
 		pr_info("%s Channel OS client acquire now successful @%s:%d\n",
 			chanId, PathName_Last_N_Nodes((u8 *) file, 4),
 			line);
-		writeb(0, &pChan->CliErrorOS);
+		writeb(0, &pChan->cli_error_os);
 	}
 	return 1;
 }
@@ -516,24 +515,24 @@ ULTRA_channel_client_release_os(void __iomem *pChannel, u8 *chanId,
 {
 	struct channel_header __iomem *pChan = pChannel;
 
-	if (readb(&pChan->CliErrorOS) != 0) {
+	if (readb(&pChan->cli_error_os) != 0) {
 		/* we are in an error msg throttling state; come out of it */
 		pr_info("%s Channel OS client error state cleared @%s:%d\n",
 			chanId, PathName_Last_N_Nodes((u8 *) file, 4),
 			line);
-		writeb(0, &pChan->CliErrorOS);
+		writeb(0, &pChan->cli_error_os);
 	}
-	if (readl(&pChan->CliStateOS) == CHANNELCLI_OWNED)
+	if (readl(&pChan->cli_state_os) == CHANNELCLI_OWNED)
 		return;
-	if (readl(&pChan->CliStateOS) != CHANNELCLI_BUSY) {
+	if (readl(&pChan->cli_state_os) != CHANNELCLI_BUSY) {
 		pr_info("%s Channel StateTransition INVALID! - release failed because OS client NOT BUSY (state=%s(%d)) @%s:%d\n",
 			chanId, ULTRA_CHANNELCLI_STRING(
-					readl(&pChan->CliStateOS)),
-			readl(&pChan->CliStateOS),
+					readl(&pChan->cli_state_os)),
+			readl(&pChan->cli_state_os),
 			PathName_Last_N_Nodes((u8 *) file, 4), line);
 		/* return; */
 	}
-	writel(CHANNELCLI_ATTACHED, &pChan->CliStateOS); /* release busy */
+	writel(CHANNELCLI_ATTACHED, &pChan->cli_state_os); /* release busy */
 }
 
 /*
diff --git a/drivers/staging/unisys/common-spar/include/channels/iochannel.h b/drivers/staging/unisys/common-spar/include/channels/iochannel.h
index 7733596..c26363d 100644
--- a/drivers/staging/unisys/common-spar/include/channels/iochannel.h
+++ b/drivers/staging/unisys/common-spar/include/channels/iochannel.h
@@ -750,29 +750,29 @@ typedef struct _ULTRA_IO_CHANNEL_PROTOCOL {
 #define QSIZEFROMBYTES(bytes) (QSLOTSFROMBYTES(bytes)*SIZEOF_CMDRSP)
 #define SignalQInit(x)						\
 	do {							\
-		x->cmdQ.Size = QSIZEFROMBYTES(x->ChannelHeader.Size);	\
+		x->cmdQ.Size = QSIZEFROMBYTES(x->ChannelHeader.size);	\
 		x->cmdQ.oSignalBase = SIZEOF_PROTOCOL -			\
 			offsetof(ULTRA_IO_CHANNEL_PROTOCOL, cmdQ);	\
 		x->cmdQ.SignalSize = SIZEOF_CMDRSP;			\
 		x->cmdQ.MaxSignalSlots =				\
-			QSLOTSFROMBYTES(x->ChannelHeader.Size);		\
+			QSLOTSFROMBYTES(x->ChannelHeader.size);		\
 		x->cmdQ.MaxSignals = x->cmdQ.MaxSignalSlots - 1;	\
-		x->rspQ.Size = QSIZEFROMBYTES(x->ChannelHeader.Size);	\
+		x->rspQ.Size = QSIZEFROMBYTES(x->ChannelHeader.size);	\
 		x->rspQ.oSignalBase =					\
 			(SIZEOF_PROTOCOL + x->cmdQ.Size) -		\
 			offsetof(ULTRA_IO_CHANNEL_PROTOCOL, rspQ);	\
 		x->rspQ.SignalSize = SIZEOF_CMDRSP;			\
 		x->rspQ.MaxSignalSlots =				\
-			QSLOTSFROMBYTES(x->ChannelHeader.Size);		\
+			QSLOTSFROMBYTES(x->ChannelHeader.size);		\
 		x->rspQ.MaxSignals = x->rspQ.MaxSignalSlots - 1;	\
-		x->ChannelHeader.oChannelSpace =			\
+		x->ChannelHeader.ch_space_offset =			\
 			offsetof(ULTRA_IO_CHANNEL_PROTOCOL, cmdQ);	\
 	} while (0)
 
 #define INIT_CLIENTSTRING(chan, type, clientStr, clientStrLen)	\
 	do {								\
 		if (clientStr) {					\
-			chan->ChannelHeader.oClientString =		\
+			chan->ChannelHeader.cli_str_offset =		\
 				offsetof(type, clientString);		\
 			memcpy(chan->clientString, clientStr,		\
 			       MINNUM(clientStrLen,			\
@@ -802,13 +802,13 @@ static inline int ULTRA_VHBA_init_channel(ULTRA_IO_CHANNEL_PROTOCOL *x,
 					      unsigned char *clientStr,
 					      u32 clientStrLen, u64 bytes)  {
 	memset(x, 0, sizeof(ULTRA_IO_CHANNEL_PROTOCOL));
-	x->ChannelHeader.VersionId = ULTRA_VHBA_CHANNEL_PROTOCOL_VERSIONID;
-	x->ChannelHeader.Signature = ULTRA_VHBA_CHANNEL_PROTOCOL_SIGNATURE;
-	x->ChannelHeader.SrvState = CHANNELSRV_UNINITIALIZED;
-	x->ChannelHeader.HeaderSize = sizeof(x->ChannelHeader);
-	x->ChannelHeader.Size = COVER(bytes, 4096);
-	x->ChannelHeader.Type = spar_vhba_channel_protocol_uuid;
-	x->ChannelHeader.ZoneGuid = NULL_UUID_LE;
+	x->ChannelHeader.version_id = ULTRA_VHBA_CHANNEL_PROTOCOL_VERSIONID;
+	x->ChannelHeader.signature = ULTRA_VHBA_CHANNEL_PROTOCOL_SIGNATURE;
+	x->ChannelHeader.srv_state = CHANNELSRV_UNINITIALIZED;
+	x->ChannelHeader.header_size = sizeof(x->ChannelHeader);
+	x->ChannelHeader.size = COVER(bytes, 4096);
+	x->ChannelHeader.chtype = spar_vhba_channel_protocol_uuid;
+	x->ChannelHeader.zone_uuid = NULL_UUID_LE;
 	x->vhba.wwnn = *wwnn;
 	x->vhba.max = *max;
 	INIT_CLIENTSTRING(x, ULTRA_IO_CHANNEL_PROTOCOL, clientStr,
@@ -838,13 +838,13 @@ static inline int ULTRA_VNIC_init_channel(ULTRA_IO_CHANNEL_PROTOCOL *x,
 						 u32 clientStrLen,
 						 u64 bytes)  {
 	memset(x, 0, sizeof(ULTRA_IO_CHANNEL_PROTOCOL));
-	x->ChannelHeader.VersionId = ULTRA_VNIC_CHANNEL_PROTOCOL_VERSIONID;
-	x->ChannelHeader.Signature = ULTRA_VNIC_CHANNEL_PROTOCOL_SIGNATURE;
-	x->ChannelHeader.SrvState = CHANNELSRV_UNINITIALIZED;
-	x->ChannelHeader.HeaderSize = sizeof(x->ChannelHeader);
-	x->ChannelHeader.Size = COVER(bytes, 4096);
-	x->ChannelHeader.Type = spar_vnic_channel_protocol_uuid;
-	x->ChannelHeader.ZoneGuid = NULL_UUID_LE;
+	x->ChannelHeader.version_id = ULTRA_VNIC_CHANNEL_PROTOCOL_VERSIONID;
+	x->ChannelHeader.signature = ULTRA_VNIC_CHANNEL_PROTOCOL_SIGNATURE;
+	x->ChannelHeader.srv_state = CHANNELSRV_UNINITIALIZED;
+	x->ChannelHeader.header_size = sizeof(x->ChannelHeader);
+	x->ChannelHeader.size = COVER(bytes, 4096);
+	x->ChannelHeader.chtype = spar_vnic_channel_protocol_uuid;
+	x->ChannelHeader.zone_uuid = NULL_UUID_LE;
 	memcpy(x->vnic.macaddr, macaddr, MAX_MACADDR_LEN);
 	x->vnic.num_rcv_bufs = num_rcv_bufs;
 	x->vnic.mtu = mtu;
diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c
index 0de0eee..687b7db 100644
--- a/drivers/staging/unisys/uislib/uislib.c
+++ b/drivers/staging/unisys/uislib/uislib.c
@@ -448,7 +448,7 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
 						struct channel_header
 							__iomem *) (dev->
 								  chanptr))->
-							    Type);
+							    chtype);
 					if (!ULTRA_VHBA_CHANNEL_OK_CLIENT
 					    (dev->chanptr, NULL)) {
 						LOGERR("CONTROLVM_DEVICE_CREATE Failed:[CLIENT]VHBA dev %d chan invalid.",
@@ -474,7 +474,7 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
 						struct channel_header
 							__iomem *) (dev->
 								  chanptr))->
-							    Type);
+							    chtype);
 					if (!ULTRA_VNIC_CHANNEL_OK_CLIENT
 					    (dev->chanptr, NULL)) {
 						LOGERR("CONTROLVM_DEVICE_CREATE Failed: VNIC[CLIENT] dev %d chan invalid.",
diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c
index c25c1d9..3e9a56d 100644
--- a/drivers/staging/unisys/virthba/virthba.c
+++ b/drivers/staging/unisys/virthba/virthba.c
@@ -429,9 +429,9 @@ virthba_ISR(int irq, void *dev_id)
 		return IRQ_NONE;
 	virthbainfo->interrupts_rcvd++;
 	pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
-	if (((readq(&pChannelHeader->Features)
+	if (((readq(&pChannelHeader->features)
 	      & ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS) != 0)
-	    && ((readq(&pChannelHeader->Features) &
+	    && ((readq(&pChannelHeader->features) &
 		 ULTRA_IO_DRIVER_DISABLES_INTS) !=
 		0)) {
 		virthbainfo->interrupts_disabled++;
@@ -444,7 +444,7 @@ virthba_ISR(int irq, void *dev_id)
 	}
 	pqhdr = (SIGNAL_QUEUE_HEADER __iomem *)
 		((char __iomem *) pChannelHeader +
-		 readq(&pChannelHeader->oChannelSpace)) + IOCHAN_FROM_IOPART;
+		 readq(&pChannelHeader->ch_space_offset)) + IOCHAN_FROM_IOPART;
 	writeq(readq(&pqhdr->NumInterruptsReceived) + 1,
 	       &pqhdr->NumInterruptsReceived);
 	atomic_set(&virthbainfo->interrupt_rcvd, 1);
@@ -578,9 +578,9 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	INIT_WORK(&virthbainfo->serverdown_completion,
 		  virthba_serverdown_complete);
 
-	writeq(readq(&virthbainfo->chinfo.queueinfo->chan->Features) |
+	writeq(readq(&virthbainfo->chinfo.queueinfo->chan->features) |
 	       ULTRA_IO_CHANNEL_IS_POLLING,
-	       &virthbainfo->chinfo.queueinfo->chan->Features);
+	       &virthbainfo->chinfo.queueinfo->chan->features);
 	/* start thread that will receive scsicmnd responses */
 	DBGINF("starting rsp thread -- queueinfo: 0x%p, threadinfo: 0x%p.\n",
 	       virthbainfo->chinfo.queueinfo, &virthbainfo->chinfo.threadinfo);
@@ -588,7 +588,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 	pChannelHeader = virthbainfo->chinfo.queueinfo->chan;
 	pqhdr = (SIGNAL_QUEUE_HEADER __iomem *)
 		((char __iomem *)pChannelHeader +
-		 readq(&pChannelHeader->oChannelSpace)) + IOCHAN_FROM_IOPART;
+		 readq(&pChannelHeader->ch_space_offset)) + IOCHAN_FROM_IOPART;
 	virthbainfo->flags_addr = &pqhdr->FeatureFlags;
 
 	if (!uisthread_start(&virthbainfo->chinfo.threadinfo,
@@ -622,7 +622,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
 		POSTCODE_LINUX_2(VHBA_PROBE_FAILURE_PC, POSTCODE_SEVERITY_ERR);
 	} else {
 		u64 __iomem *Features_addr =
-		    &virthbainfo->chinfo.queueinfo->chan->Features;
+		    &virthbainfo->chinfo.queueinfo->chan->features;
 		LOGERR("request_irq(%d) uislib_virthba_ISR request succeeded\n",
 		       virthbainfo->interrupt_vector);
 		mask = ~(ULTRA_IO_CHANNEL_IS_POLLING |
@@ -1453,7 +1453,7 @@ static ssize_t enable_ints_write(struct file *file,
 		if (VirtHbasOpen[i].virthbainfo != NULL) {
 			virthbainfo = VirtHbasOpen[i].virthbainfo;
 			Features_addr =
-				&virthbainfo->chinfo.queueinfo->chan->Features;
+				&virthbainfo->chinfo.queueinfo->chan->features;
 			if (new_value == 1) {
 				mask = ~(ULTRA_IO_CHANNEL_IS_POLLING |
 					 ULTRA_IO_DRIVER_DISABLES_INTS);
diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index d2fc89a..19f5c77 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -89,10 +89,10 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channelBytes,
 	}
 	if (channelBytes == 0)
 		/* we had better be a CLIENT of this channel */
-		channelBytes = (ulong) p->chan_hdr.Size;
+		channelBytes = (ulong) p->chan_hdr.size;
 	if (uuid_le_cmp(guid, NULL_UUID_LE) == 0)
 		/* we had better be a CLIENT of this channel */
-		guid = p->chan_hdr.Type;
+		guid = p->chan_hdr.chtype;
 	if (visor_memregion_resize(p->memregion, channelBytes) < 0) {
 		ERRDRV("visor_memregion_resize failed: (status=0)\n");
 		rc = NULL;
@@ -194,14 +194,14 @@ EXPORT_SYMBOL_GPL(visorchannel_id);
 char *
 visorchannel_zoneid(VISORCHANNEL *channel, char *s)
 {
-	return visorchannel_uuid_id(&channel->chan_hdr.ZoneGuid, s);
+	return visorchannel_uuid_id(&channel->chan_hdr.zone_uuid, s);
 }
 EXPORT_SYMBOL_GPL(visorchannel_zoneid);
 
 HOSTADDRESS
 visorchannel_get_clientpartition(VISORCHANNEL *channel)
 {
-	return channel->chan_hdr.PartitionHandle;
+	return channel->chan_hdr.partition_handle;
 }
 EXPORT_SYMBOL_GPL(visorchannel_get_clientpartition);
 
@@ -295,7 +295,7 @@ EXPORT_SYMBOL_GPL(visorchannel_get_header);
  *  channel header
  */
 #define SIG_QUEUE_OFFSET(chan_hdr, q) \
-	((chan_hdr)->oChannelSpace + ((q) * sizeof(SIGNAL_QUEUE_HEADER)))
+	((chan_hdr)->ch_space_offset + ((q) * sizeof(SIGNAL_QUEUE_HEADER)))
 
 /** Return offset of a specific queue entry (data) from the beginning of a
  *  channel header
@@ -320,7 +320,7 @@ sig_read_header(VISORCHANNEL *channel, u32 queue,
 {
 	BOOL rc = FALSE;
 
-	if (channel->chan_hdr.oChannelSpace < sizeof(struct channel_header)) {
+	if (channel->chan_hdr.ch_space_offset < sizeof(struct channel_header)) {
 		ERRDRV("oChannelSpace too small: (status=%d)\n", rc);
 		goto Away;
 	}
@@ -591,38 +591,38 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues,
 		} else
 			return;
 	}
-	nbytes = (ulong) (phdr->Size);
+	nbytes = (ulong) (phdr->size);
 	seq_printf(seq, "--- Begin channel @0x%-16.16Lx for 0x%lx bytes (region=0x%lx bytes) ---\n",
 		   addr + off, nbytes, nbytes_region);
-	seq_printf(seq, "Type            = %pUL\n", &phdr->Type);
-	seq_printf(seq, "ZoneGuid        = %pUL\n", &phdr->ZoneGuid);
+	seq_printf(seq, "Type            = %pUL\n", &phdr->chtype);
+	seq_printf(seq, "ZoneGuid        = %pUL\n", &phdr->zone_uuid);
 	seq_printf(seq, "Signature       = 0x%-16.16Lx\n",
-		   (long long) phdr->Signature);
-	seq_printf(seq, "LegacyState     = %lu\n", (ulong) phdr->LegacyState);
-	seq_printf(seq, "SrvState        = %lu\n", (ulong) phdr->SrvState);
-	seq_printf(seq, "CliStateBoot    = %lu\n", (ulong) phdr->CliStateBoot);
-	seq_printf(seq, "CliStateOS      = %lu\n", (ulong) phdr->CliStateOS);
-	seq_printf(seq, "HeaderSize      = %lu\n", (ulong) phdr->HeaderSize);
-	seq_printf(seq, "Size            = %llu\n", (long long) phdr->Size);
+		   (long long) phdr->signature);
+	seq_printf(seq, "LegacyState     = %lu\n", (ulong)phdr->legacy_state);
+	seq_printf(seq, "SrvState        = %lu\n", (ulong)phdr->srv_state);
+	seq_printf(seq, "CliStateBoot    = %lu\n", (ulong)phdr->cli_state_boot);
+	seq_printf(seq, "CliStateOS      = %lu\n", (ulong)phdr->cli_state_os);
+	seq_printf(seq, "HeaderSize      = %lu\n", (ulong)phdr->header_size);
+	seq_printf(seq, "Size            = %llu\n", (long long)phdr->size);
 	seq_printf(seq, "Features        = 0x%-16.16llx\n",
-		   (long long) phdr->Features);
+		   (long long) phdr->features);
 	seq_printf(seq, "PartitionHandle = 0x%-16.16llx\n",
-		   (long long) phdr->PartitionHandle);
+		   (long long) phdr->partition_handle);
 	seq_printf(seq, "Handle          = 0x%-16.16llx\n",
-		   (long long) phdr->Handle);
-	seq_printf(seq, "VersionId       = %lu\n", (ulong) phdr->VersionId);
+		   (long long) phdr->handle);
+	seq_printf(seq, "VersionId       = %lu\n", (ulong) phdr->version_id);
 	seq_printf(seq, "oChannelSpace   = %llu\n",
-		   (long long) phdr->oChannelSpace);
-	if ((phdr->oChannelSpace == 0) || (errcode < 0))
+		   (long long) phdr->ch_space_offset);
+	if ((phdr->ch_space_offset == 0) || (errcode < 0))
 		;
 	else
 		for (i = 0; i < nQueues; i++) {
 			SIGNAL_QUEUE_HEADER q;
 
 			errcode = visorchannel_read(channel,
-						    off + phdr->oChannelSpace +
-						    (i * sizeof(q)),
-						    &q, sizeof(q));
+					off + phdr->ch_space_offset +
+						(i * sizeof(q)),
+					&q, sizeof(q));
 			if (errcode < 0) {
 				seq_printf(seq,
 					   "failed to read signal queue #%d from channel @0x%-16.16Lx errcode=%d\n",
-- 
1.9.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux