summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys
diff options
context:
space:
mode:
authorBenjamin Romer <benjamin.romer@unisys.com>2015-03-16 13:58:25 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-23 21:53:53 +0100
commit61715c8b9c532e41547d47f649649c2250e98e27 (patch)
treeca3652e965c1321e08742d0e51e4a67f4bc2eaa4 /drivers/staging/unisys
parent0278a9055ac94ff368e8cdf3de3de25967c7f66b (diff)
downloadop-kernel-dev-61715c8b9c532e41547d47f649649c2250e98e27.zip
op-kernel-dev-61715c8b9c532e41547d47f649649c2250e98e27.tar.gz
staging: unisys: refactor my_device_destroy()
Fix the CamelCase variable names: busNo => bus_no devNo => dev_no pDevInfo => dev_info Update all the references to the updated names, then remove the goto and its label. Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r--drivers/staging/unisys/visorchipset/visorchipset_main.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index 9327837..4fe1ad1 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -1235,26 +1235,23 @@ static void
my_device_destroy(struct controlvm_message *inmsg)
{
struct controlvm_message_packet *cmd = &inmsg->cmd;
- ulong busNo = cmd->destroy_device.bus_no;
- ulong devNo = cmd->destroy_device.dev_no;
- struct visorchipset_device_info *pDevInfo = NULL;
+ ulong bus_no = cmd->destroy_device.bus_no;
+ ulong dev_no = cmd->destroy_device.dev_no;
+ struct visorchipset_device_info *dev_info = NULL;
int rc = CONTROLVM_RESP_SUCCESS;
- pDevInfo = finddevice(&dev_info_list, busNo, devNo);
- if (!pDevInfo) {
+ dev_info = finddevice(&dev_info_list, bus_no, dev_no);
+ if (!dev_info)
rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID;
- goto Away;
- }
- if (pDevInfo->state.created == 0)
+ else if (dev_info->state.created == 0)
rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
-Away:
- if ((rc >= CONTROLVM_RESP_SUCCESS) && pDevInfo)
- device_epilog(busNo, devNo, segment_state_running,
+ if ((rc >= CONTROLVM_RESP_SUCCESS) && dev_info)
+ device_epilog(bus_no, dev_no, segment_state_running,
CONTROLVM_DEVICE_DESTROY, &inmsg->hdr, rc,
inmsg->hdr.flags.response_expected == 1,
FOR_VISORBUS(
- pDevInfo->chan_info.channel_type_uuid));
+ dev_info->chan_info.channel_type_uuid));
}
/* When provided with the physical address of the controlvm channel
OpenPOWER on IntegriCloud