summaryrefslogtreecommitdiff
path: root/drivers/staging/unisys/visorchipset
diff options
context:
space:
mode:
authorBenjamin Romer <benjamin.romer@unisys.com>2014-10-31 09:57:23 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-03 15:59:01 -0800
commit9b1caee7170b9078f39c2f4c7a33334ad40cd47b (patch)
treef0122bafd56ef6c097a10be6c9ecd77e64ec717f /drivers/staging/unisys/visorchipset
parent2c683cde06c1d57a9ecbacc484540e259e7255fa (diff)
staging: unisys: refactor VISORCHIPSET_CHANNEL_INFO
Remove the typedef from this type and use struct visorchipset_channel_info instead. Fix CamelCase member names: addrType => addr_type channelAddr => channel_addr nChannelBytes => n_channel_bytes channelTypeGuid => channel_type_uuid channelInstGuid => channel_inst_uuid Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/visorchipset')
-rw-r--r--drivers/staging/unisys/visorchipset/visorchipset.h18
-rw-r--r--drivers/staging/unisys/visorchipset/visorchipset_main.c38
2 files changed, 30 insertions, 26 deletions
diff --git a/drivers/staging/unisys/visorchipset/visorchipset.h b/drivers/staging/unisys/visorchipset/visorchipset.h
index 75f20f068225..c8a936684cfb 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset.h
+++ b/drivers/staging/unisys/visorchipset/visorchipset.h
@@ -60,15 +60,15 @@ enum crash_obj_type {
/** Attributes for a particular Supervisor channel.
*/
-typedef struct {
- enum visorchipset_addresstype addrType;
- HOSTADDRESS channelAddr;
+struct visorchipset_channel_info {
+ enum visorchipset_addresstype addr_type;
+ HOSTADDRESS channel_addr;
struct irq_info intr;
- u64 nChannelBytes;
- uuid_le channelTypeGuid;
- uuid_le channelInstGuid;
+ u64 n_channel_bytes;
+ uuid_le channel_type_uuid;
+ uuid_le channel_inst_uuid;
-} VISORCHIPSET_CHANNEL_INFO;
+};
/** Attributes for a particular Supervisor device.
* Any visorchipset client can query these attributes using
@@ -81,7 +81,7 @@ typedef struct {
u32 devNo;
uuid_le devInstGuid;
struct visorchipset_state state;
- VISORCHIPSET_CHANNEL_INFO chanInfo;
+ struct visorchipset_channel_info chanInfo;
u32 Reserved1; /* control_vm_id */
u64 Reserved2;
u32 switchNo; /* when devState.attached==1 */
@@ -126,7 +126,7 @@ typedef struct {
struct list_head entry;
u32 busNo;
struct visorchipset_state state;
- VISORCHIPSET_CHANNEL_INFO chanInfo;
+ struct visorchipset_channel_info chanInfo;
uuid_le partitionGuid;
u64 partitionHandle;
u8 *name; /* UTF8 */
diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index 229c75881c5a..00a3445c3ce2 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -1131,15 +1131,16 @@ bus_create(struct controlvm_message *inmsg)
POSTCODE_LINUX_3(BUS_CREATE_ENTRY_PC, busNo, POSTCODE_SEVERITY_INFO);
if (inmsg->hdr.flags.test_message == 1)
- pBusInfo->chanInfo.addrType = ADDRTYPE_LOCALTEST;
+ pBusInfo->chanInfo.addr_type = ADDRTYPE_LOCALTEST;
else
- pBusInfo->chanInfo.addrType = ADDRTYPE_LOCALPHYSICAL;
+ pBusInfo->chanInfo.addr_type = ADDRTYPE_LOCALPHYSICAL;
pBusInfo->flags.server = inmsg->hdr.flags.server;
- pBusInfo->chanInfo.channelAddr = cmd->create_bus.channel_addr;
- pBusInfo->chanInfo.nChannelBytes = cmd->create_bus.channel_bytes;
- pBusInfo->chanInfo.channelTypeGuid = cmd->create_bus.bus_data_type_uuid;
- pBusInfo->chanInfo.channelInstGuid = cmd->create_bus.bus_inst_uuid;
+ pBusInfo->chanInfo.channel_addr = cmd->create_bus.channel_addr;
+ pBusInfo->chanInfo.n_channel_bytes = cmd->create_bus.channel_bytes;
+ pBusInfo->chanInfo.channel_type_uuid =
+ cmd->create_bus.bus_data_type_uuid;
+ pBusInfo->chanInfo.channel_inst_uuid = cmd->create_bus.bus_inst_uuid;
list_add(&pBusInfo->entry, &BusInfoList);
@@ -1281,19 +1282,20 @@ my_device_create(struct controlvm_message *inmsg)
POSTCODE_SEVERITY_INFO);
if (inmsg->hdr.flags.test_message == 1)
- pDevInfo->chanInfo.addrType = ADDRTYPE_LOCALTEST;
+ pDevInfo->chanInfo.addr_type = ADDRTYPE_LOCALTEST;
else
- pDevInfo->chanInfo.addrType = ADDRTYPE_LOCALPHYSICAL;
- pDevInfo->chanInfo.channelAddr = cmd->create_device.channel_addr;
- pDevInfo->chanInfo.nChannelBytes = cmd->create_device.channel_bytes;
- pDevInfo->chanInfo.channelTypeGuid = cmd->create_device.data_type_uuid;
+ pDevInfo->chanInfo.addr_type = ADDRTYPE_LOCALPHYSICAL;
+ pDevInfo->chanInfo.channel_addr = cmd->create_device.channel_addr;
+ pDevInfo->chanInfo.n_channel_bytes = cmd->create_device.channel_bytes;
+ pDevInfo->chanInfo.channel_type_uuid =
+ cmd->create_device.data_type_uuid;
pDevInfo->chanInfo.intr = cmd->create_device.intr;
list_add(&pDevInfo->entry, &DevInfoList);
POSTCODE_LINUX_4(DEVICE_CREATE_EXIT_PC, devNo, busNo,
POSTCODE_SEVERITY_INFO);
Away:
/* get the bus and devNo for DiagPool channel */
- if (is_diagpool_channel(pDevInfo->chanInfo.channelTypeGuid)) {
+ if (is_diagpool_channel(pDevInfo->chanInfo.channel_type_uuid)) {
g_diagpoolBusNo = busNo;
g_diagpoolDevNo = devNo;
LOGINF("CONTROLVM_DEVICE_CREATE for DiagPool channel: busNo=%lu, devNo=%lu",
@@ -1302,7 +1304,7 @@ Away:
device_epilog(busNo, devNo, segment_state_running,
CONTROLVM_DEVICE_CREATE, &inmsg->hdr, rc,
inmsg->hdr.flags.response_expected == 1,
- FOR_VISORBUS(pDevInfo->chanInfo.channelTypeGuid));
+ FOR_VISORBUS(pDevInfo->chanInfo.channel_type_uuid));
}
static void
@@ -1336,7 +1338,8 @@ Away:
device_epilog(busNo, devNo, state, CONTROLVM_DEVICE_CHANGESTATE,
&inmsg->hdr, rc,
inmsg->hdr.flags.response_expected == 1,
- FOR_VISORBUS(pDevInfo->chanInfo.channelTypeGuid));
+ FOR_VISORBUS(
+ pDevInfo->chanInfo.channel_type_uuid));
}
static void
@@ -1366,7 +1369,8 @@ Away:
device_epilog(busNo, devNo, segment_state_running,
CONTROLVM_DEVICE_DESTROY, &inmsg->hdr, rc,
inmsg->hdr.flags.response_expected == 1,
- FOR_VISORBUS(pDevInfo->chanInfo.channelTypeGuid));
+ FOR_VISORBUS(
+ pDevInfo->chanInfo.channel_type_uuid));
}
/* When provided with the physical address of the controlvm channel
@@ -1932,7 +1936,7 @@ static HOSTADDRESS controlvm_get_channel_address(void)
static void
controlvm_periodic_work(struct work_struct *work)
{
- VISORCHIPSET_CHANNEL_INFO chanInfo;
+ struct visorchipset_channel_info chanInfo;
struct controlvm_message inmsg;
BOOL gotACommand = FALSE;
BOOL handle_command_failed = FALSE;
@@ -1947,7 +1951,7 @@ controlvm_periodic_work(struct work_struct *work)
if (visorchipset_clientregwait && !clientregistered)
goto Away;
- memset(&chanInfo, 0, sizeof(VISORCHIPSET_CHANNEL_INFO));
+ memset(&chanInfo, 0, sizeof(struct visorchipset_channel_info));
Poll_Count++;
if (Poll_Count >= 250)