Commit 43ecb9fe authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman

staging: unisys: Clean up CamelCase in struct bus_info

Clean up CamelCase names:
busNo => bus_no
deviceCount => device_count
guestHandle => guest_handle
recvBusInterruptHandle => recv_bus_irq_handle
busInstGuid => inst_uuid
pBusChannel => bus_channel
busChannelBytes => bus_channel_bytes
partitionName => partition_name
localVnic => local_vnic
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bae4e2ad
...@@ -154,18 +154,18 @@ enum switch_type { ...@@ -154,18 +154,18 @@ enum switch_type {
}; };
struct bus_info { struct bus_info {
u32 busNo, deviceCount; u32 bus_no, device_count;
struct device_info **device; struct device_info **device;
u64 guestHandle, recvBusInterruptHandle; u64 guest_handle, recv_bus_irq_handle;
uuid_le busInstGuid; uuid_le bus_inst_uuid;
ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *pBusChannel; ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *bus_channel;
int busChannelBytes; int bus_channel_bytes;
struct proc_dir_entry *proc_dir; /* proc/uislib/vbus/<x> */ struct proc_dir_entry *proc_dir; /* proc/uislib/vbus/<x> */
struct proc_dir_entry *proc_info; /* proc/uislib/vbus/<x>/info */ struct proc_dir_entry *proc_info; /* proc/uislib/vbus/<x>/info */
char name[25]; char name[25];
char partitionName[99]; char partition_name[99];
struct bus_info *next; struct bus_info *next;
u8 localVnic; /* 1 if local vnic created internally u8 local_vnic; /* 1 if local vnic created internally
* by IOVM; 0 otherwise... */ * by IOVM; 0 otherwise... */
}; };
......
...@@ -190,23 +190,23 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -190,23 +190,23 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf)
*/ */
if (msg->hdr.Flags.testMessage) { if (msg->hdr.Flags.testMessage) {
/* This implies we're the IOVM so set guest handle to 0... */ /* This implies we're the IOVM so set guest handle to 0... */
bus->guestHandle = 0; bus->guest_handle = 0;
bus->busNo = busNo; bus->bus_no = busNo;
bus->localVnic = 1; bus->local_vnic = 1;
} else } else
bus->busNo = bus->guestHandle = busNo; bus->bus_no = bus->guest_handle = busNo;
sprintf(bus->name, "%d", (int) bus->busNo); sprintf(bus->name, "%d", (int) bus->bus_no);
bus->deviceCount = deviceCount; bus->device_count = deviceCount;
bus->device = bus->device =
(struct device_info **) ((char *) bus + sizeof(struct bus_info)); (struct device_info **) ((char *) bus + sizeof(struct bus_info));
bus->busInstGuid = msg->cmd.createBus.busInstGuid; bus->bus_inst_uuid = msg->cmd.createBus.busInstGuid;
bus->busChannelBytes = 0; bus->bus_channel_bytes = 0;
bus->pBusChannel = NULL; bus->bus_channel = NULL;
/* add bus to our bus list - but check for duplicates first */ /* add bus to our bus list - but check for duplicates first */
read_lock(&BusListLock); read_lock(&BusListLock);
for (tmp = BusListHead; tmp; tmp = tmp->next) { for (tmp = BusListHead; tmp; tmp = tmp->next) {
if (tmp->busNo == bus->busNo) if (tmp->bus_no == bus->bus_no)
break; break;
} }
read_unlock(&BusListLock); read_unlock(&BusListLock);
...@@ -215,16 +215,16 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -215,16 +215,16 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf)
* reject add * reject add
*/ */
LOGERR("CONTROLVM_BUS_CREATE Failed: bus %d already exists.\n", LOGERR("CONTROLVM_BUS_CREATE Failed: bus %d already exists.\n",
bus->busNo); bus->bus_no);
POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus->busNo, POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus->bus_no,
POSTCODE_SEVERITY_ERR); POSTCODE_SEVERITY_ERR);
kfree(bus); kfree(bus);
return CONTROLVM_RESP_ERROR_ALREADY_DONE; return CONTROLVM_RESP_ERROR_ALREADY_DONE;
} }
if ((msg->cmd.createBus.channelAddr != 0) if ((msg->cmd.createBus.channelAddr != 0)
&& (msg->cmd.createBus.channelBytes != 0)) { && (msg->cmd.createBus.channelBytes != 0)) {
bus->busChannelBytes = msg->cmd.createBus.channelBytes; bus->bus_channel_bytes = msg->cmd.createBus.channelBytes;
bus->pBusChannel = bus->bus_channel =
init_vbus_channel(msg->cmd.createBus.channelAddr, init_vbus_channel(msg->cmd.createBus.channelAddr,
msg->cmd.createBus.channelBytes); msg->cmd.createBus.channelBytes);
} }
...@@ -234,20 +234,20 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -234,20 +234,20 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf)
cmd.msgtype = GUEST_ADD_VBUS; cmd.msgtype = GUEST_ADD_VBUS;
cmd.add_vbus.busNo = busNo; cmd.add_vbus.busNo = busNo;
cmd.add_vbus.chanptr = bus->pBusChannel; cmd.add_vbus.chanptr = bus->bus_channel;
cmd.add_vbus.deviceCount = deviceCount; cmd.add_vbus.deviceCount = deviceCount;
cmd.add_vbus.busTypeGuid = msg->cmd.createBus.busDataTypeGuid; cmd.add_vbus.busTypeGuid = msg->cmd.createBus.busDataTypeGuid;
cmd.add_vbus.busInstGuid = msg->cmd.createBus.busInstGuid; cmd.add_vbus.busInstGuid = msg->cmd.createBus.busInstGuid;
if (!VirtControlChanFunc) { if (!VirtControlChanFunc) {
LOGERR("CONTROLVM_BUS_CREATE Failed: virtpci callback not registered."); LOGERR("CONTROLVM_BUS_CREATE Failed: virtpci callback not registered.");
POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus->busNo, POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus->bus_no,
POSTCODE_SEVERITY_ERR); POSTCODE_SEVERITY_ERR);
kfree(bus); kfree(bus);
return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE; return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE;
} }
if (!VirtControlChanFunc(&cmd)) { if (!VirtControlChanFunc(&cmd)) {
LOGERR("CONTROLVM_BUS_CREATE Failed: virtpci GUEST_ADD_VBUS returned error."); LOGERR("CONTROLVM_BUS_CREATE Failed: virtpci GUEST_ADD_VBUS returned error.");
POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus->busNo, POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus->bus_no,
POSTCODE_SEVERITY_ERR); POSTCODE_SEVERITY_ERR);
kfree(bus); kfree(bus);
return return
...@@ -266,7 +266,7 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -266,7 +266,7 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf)
BusListCount++; BusListCount++;
write_unlock(&BusListLock); write_unlock(&BusListLock);
POSTCODE_LINUX_3(BUS_CREATE_EXIT_PC, bus->busNo, POSTCODE_LINUX_3(BUS_CREATE_EXIT_PC, bus->bus_no,
POSTCODE_SEVERITY_INFO); POSTCODE_SEVERITY_INFO);
return CONTROLVM_RESP_SUCCESS; return CONTROLVM_RESP_SUCCESS;
} }
...@@ -285,7 +285,7 @@ destroy_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -285,7 +285,7 @@ destroy_bus(CONTROLVM_MESSAGE *msg, char *buf)
bus = BusListHead; bus = BusListHead;
while (bus) { while (bus) {
if (bus->busNo == busNo) if (bus->bus_no == busNo)
break; break;
prev = bus; prev = bus;
bus = bus->next; bus = bus->next;
...@@ -299,7 +299,7 @@ destroy_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -299,7 +299,7 @@ destroy_bus(CONTROLVM_MESSAGE *msg, char *buf)
} }
/* verify that this bus has no devices. */ /* verify that this bus has no devices. */
for (i = 0; i < bus->deviceCount; i++) { for (i = 0; i < bus->device_count; i++) {
if (bus->device[i] != NULL) { if (bus->device[i] != NULL) {
LOGERR("CONTROLVM_BUS_DESTROY Failed: device %i attached to bus %d.", LOGERR("CONTROLVM_BUS_DESTROY Failed: device %i attached to bus %d.",
i, busNo); i, busNo);
...@@ -335,9 +335,9 @@ destroy_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -335,9 +335,9 @@ destroy_bus(CONTROLVM_MESSAGE *msg, char *buf)
BusListCount--; BusListCount--;
write_unlock(&BusListLock); write_unlock(&BusListLock);
if (bus->pBusChannel) { if (bus->bus_channel) {
uislib_iounmap(bus->pBusChannel); uislib_iounmap(bus->bus_channel);
bus->pBusChannel = NULL; bus->bus_channel = NULL;
} }
kfree(bus); kfree(bus);
...@@ -412,11 +412,11 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -412,11 +412,11 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
read_lock(&BusListLock); read_lock(&BusListLock);
for (bus = BusListHead; bus; bus = bus->next) { for (bus = BusListHead; bus; bus = bus->next) {
if (bus->busNo == busNo) { if (bus->bus_no == busNo) {
/* make sure the device number is valid */ /* make sure the device number is valid */
if (devNo >= bus->deviceCount) { if (devNo >= bus->device_count) {
LOGERR("CONTROLVM_DEVICE_CREATE Failed: device (%d) >= deviceCount (%d).", LOGERR("CONTROLVM_DEVICE_CREATE Failed: device (%d) >= deviceCount (%d).",
devNo, bus->deviceCount); devNo, bus->device_count);
result = CONTROLVM_RESP_ERROR_MAX_DEVICES; result = CONTROLVM_RESP_ERROR_MAX_DEVICES;
POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC,
devNo, busNo, devNo, busNo,
...@@ -555,11 +555,11 @@ pause_device(CONTROLVM_MESSAGE *msg) ...@@ -555,11 +555,11 @@ pause_device(CONTROLVM_MESSAGE *msg)
read_lock(&BusListLock); read_lock(&BusListLock);
for (bus = BusListHead; bus; bus = bus->next) { for (bus = BusListHead; bus; bus = bus->next) {
if (bus->busNo == busNo) { if (bus->bus_no == busNo) {
/* make sure the device number is valid */ /* make sure the device number is valid */
if (devNo >= bus->deviceCount) { if (devNo >= bus->device_count) {
LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: device(%d) >= deviceCount(%d).", LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: device(%d) >= deviceCount(%d).",
devNo, bus->deviceCount); devNo, bus->device_count);
retval = CONTROLVM_RESP_ERROR_DEVICE_INVALID; retval = CONTROLVM_RESP_ERROR_DEVICE_INVALID;
} else { } else {
/* make sure this device exists */ /* make sure this device exists */
...@@ -623,11 +623,11 @@ resume_device(CONTROLVM_MESSAGE *msg) ...@@ -623,11 +623,11 @@ resume_device(CONTROLVM_MESSAGE *msg)
read_lock(&BusListLock); read_lock(&BusListLock);
for (bus = BusListHead; bus; bus = bus->next) { for (bus = BusListHead; bus; bus = bus->next) {
if (bus->busNo == busNo) { if (bus->bus_no == busNo) {
/* make sure the device number is valid */ /* make sure the device number is valid */
if (devNo >= bus->deviceCount) { if (devNo >= bus->device_count) {
LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: device(%d) >= deviceCount(%d).", LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: device(%d) >= deviceCount(%d).",
devNo, bus->deviceCount); devNo, bus->device_count);
retval = CONTROLVM_RESP_ERROR_DEVICE_INVALID; retval = CONTROLVM_RESP_ERROR_DEVICE_INVALID;
} else { } else {
/* make sure this device exists */ /* make sure this device exists */
...@@ -693,11 +693,11 @@ destroy_device(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -693,11 +693,11 @@ destroy_device(CONTROLVM_MESSAGE *msg, char *buf)
read_lock(&BusListLock); read_lock(&BusListLock);
LOGINF("destroy_device called for busNo=%u, devNo=%u", busNo, devNo); LOGINF("destroy_device called for busNo=%u, devNo=%u", busNo, devNo);
for (bus = BusListHead; bus; bus = bus->next) { for (bus = BusListHead; bus; bus = bus->next) {
if (bus->busNo == busNo) { if (bus->bus_no == busNo) {
/* make sure the device number is valid */ /* make sure the device number is valid */
if (devNo >= bus->deviceCount) { if (devNo >= bus->device_count) {
LOGERR("CONTROLVM_DEVICE_DESTORY Failed: device(%d) >= deviceCount(%d).", LOGERR("CONTROLVM_DEVICE_DESTORY Failed: device(%d) >= deviceCount(%d).",
devNo, bus->deviceCount); devNo, bus->device_count);
retval = CONTROLVM_RESP_ERROR_DEVICE_INVALID; retval = CONTROLVM_RESP_ERROR_DEVICE_INVALID;
} else { } else {
/* make sure this device exists */ /* make sure this device exists */
...@@ -1206,17 +1206,17 @@ info_debugfs_read_helper(char **buff, int *buff_len) ...@@ -1206,17 +1206,17 @@ info_debugfs_read_helper(char **buff, int *buff_len)
for (bus = BusListHead; bus; bus = bus->next) { for (bus = BusListHead; bus; bus = bus->next) {
if (PLINE(" bus=0x%p, busNo=%d, deviceCount=%d\n", if (PLINE(" bus=0x%p, busNo=%d, deviceCount=%d\n",
bus, bus->busNo, bus->deviceCount) < 0) bus, bus->bus_no, bus->device_count) < 0)
goto err_done_unlock; goto err_done_unlock;
if (PLINE(" Devices:\n") < 0) if (PLINE(" Devices:\n") < 0)
goto err_done_unlock; goto err_done_unlock;
for (i = 0; i < bus->deviceCount; i++) { for (i = 0; i < bus->device_count; i++) {
if (bus->device[i]) { if (bus->device[i]) {
if (PLINE(" busNo %d, device[%i]: 0x%p, chanptr=0x%p, swtch=0x%p\n", if (PLINE(" busNo %d, device[%i]: 0x%p, chanptr=0x%p, swtch=0x%p\n",
bus->busNo, i, bus->device[i], bus->bus_no, i, bus->device[i],
bus->device[i]->chanptr, bus->device[i]->chanptr,
bus->device[i]->swtch) < 0) bus->device[i]->swtch) < 0)
goto err_done_unlock; goto err_done_unlock;
...@@ -1294,9 +1294,9 @@ find_dev(u32 busNo, u32 devNo) ...@@ -1294,9 +1294,9 @@ find_dev(u32 busNo, u32 devNo)
read_lock(&BusListLock); read_lock(&BusListLock);
for (bus = BusListHead; bus; bus = bus->next) { for (bus = BusListHead; bus; bus = bus->next) {
if (bus->busNo == busNo) { if (bus->bus_no == busNo) {
/* make sure the device number is valid */ /* make sure the device number is valid */
if (devNo >= bus->deviceCount) { if (devNo >= bus->device_count) {
LOGERR("%s bad busNo, devNo=%d,%d", LOGERR("%s bad busNo, devNo=%d,%d",
__func__, __func__,
(int) (busNo), (int) (devNo)); (int) (busNo), (int) (devNo));
......
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