diff options
author | Benjamin Romer <benjamin.romer@unisys.com> | 2015-03-16 18:58:24 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-23 21:53:52 +0100 |
commit | 0278a9055ac94ff368e8cdf3de3de25967c7f66b (patch) | |
tree | 0059e882a9d4b0f065f8b6c0e57d026637a9b85a | |
parent | staging: unisys: refactor my_device_create() (diff) | |
download | linux-0278a9055ac94ff368e8cdf3de3de25967c7f66b.tar.xz linux-0278a9055ac94ff368e8cdf3de3de25967c7f66b.zip |
staging: unisys: refactor my_device_changestate()
Fix the CamelCase names:
busNo => bus_no
devNo => dev_no
pDevInfo => dev_info
Update all references to use the new names, and remove the goto and
label entirely.
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/unisys/visorchipset/visorchipset_main.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index 603afed55087..9327837ee449 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -1207,31 +1207,28 @@ static void my_device_changestate(struct controlvm_message *inmsg) { struct controlvm_message_packet *cmd = &inmsg->cmd; - ulong busNo = cmd->device_change_state.bus_no; - ulong devNo = cmd->device_change_state.dev_no; + ulong bus_no = cmd->device_change_state.bus_no; + ulong dev_no = cmd->device_change_state.dev_no; struct spar_segment_state state = cmd->device_change_state.state; - struct visorchipset_device_info *pDevInfo = NULL; + struct visorchipset_device_info *dev_info = NULL; int rc = CONTROLVM_RESP_SUCCESS; - pDevInfo = finddevice(&dev_info_list, busNo, devNo); - if (!pDevInfo) { - POSTCODE_LINUX_4(DEVICE_CHANGESTATE_FAILURE_PC, devNo, busNo, + dev_info = finddevice(&dev_info_list, bus_no, dev_no); + if (!dev_info) { + POSTCODE_LINUX_4(DEVICE_CHANGESTATE_FAILURE_PC, dev_no, bus_no, POSTCODE_SEVERITY_ERR); rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID; - goto Away; - } - if (pDevInfo->state.created == 0) { - POSTCODE_LINUX_4(DEVICE_CHANGESTATE_FAILURE_PC, devNo, busNo, + } else if (dev_info->state.created == 0) { + POSTCODE_LINUX_4(DEVICE_CHANGESTATE_FAILURE_PC, dev_no, bus_no, POSTCODE_SEVERITY_ERR); rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID; } -Away: - if ((rc >= CONTROLVM_RESP_SUCCESS) && pDevInfo) - device_epilog(busNo, devNo, state, CONTROLVM_DEVICE_CHANGESTATE, - &inmsg->hdr, rc, + if ((rc >= CONTROLVM_RESP_SUCCESS) && dev_info) + device_epilog(bus_no, dev_no, state, + CONTROLVM_DEVICE_CHANGESTATE, &inmsg->hdr, rc, inmsg->hdr.flags.response_expected == 1, FOR_VISORBUS( - pDevInfo->chan_info.channel_type_uuid)); + dev_info->chan_info.channel_type_uuid)); } static void |