Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dff54cd6 authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman
Browse files

staging: unisys: refactor bus_destroy()



Fix CamelCase names:

busNo => bus_no
pBusInfo => bus_info

Update all references to use the corrected names, and remove the goto
statements and labels entirely.

Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6c5fed35
Loading
Loading
Loading
Loading
+6 −11
Original line number Original line Diff line number Diff line
@@ -1078,22 +1078,17 @@ static void
bus_destroy(struct controlvm_message *inmsg)
bus_destroy(struct controlvm_message *inmsg)
{
{
	struct controlvm_message_packet *cmd = &inmsg->cmd;
	struct controlvm_message_packet *cmd = &inmsg->cmd;
	ulong busNo = cmd->destroy_bus.bus_no;
	ulong bus_no = cmd->destroy_bus.bus_no;
	struct visorchipset_bus_info *pBusInfo;
	struct visorchipset_bus_info *bus_info;
	int rc = CONTROLVM_RESP_SUCCESS;
	int rc = CONTROLVM_RESP_SUCCESS;


	pBusInfo = findbus(&bus_info_list, busNo);
	bus_info = findbus(&bus_info_list, bus_no);
	if (!pBusInfo) {
	if (!bus_info)
		rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
		rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
		goto Away;
	else if (bus_info->state.created == 0)
	}
	if (pBusInfo->state.created == 0) {
		rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
		rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
		goto Away;
	}


Away:
	bus_epilog(bus_no, CONTROLVM_BUS_DESTROY, &inmsg->hdr,
	bus_epilog(busNo, CONTROLVM_BUS_DESTROY, &inmsg->hdr,
		   rc, inmsg->hdr.flags.response_expected == 1);
		   rc, inmsg->hdr.flags.response_expected == 1);
}
}