Commit 2836c6a8 authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman

staging: unisys: fix CamelCase in epilog functions

Rename the CamelCase parameters:

busNo => bus_no
devNo => dev_no
needResponse => need_response

And the local variables

pBusInfo => bus_info
pDevInfo => dev_info

Update all references to use the corrected names.
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fbb31f48
...@@ -860,22 +860,23 @@ device_responder(enum controlvm_id cmd_id, ulong bus_no, ulong dev_no, ...@@ -860,22 +860,23 @@ device_responder(enum controlvm_id cmd_id, ulong bus_no, ulong dev_no,
} }
static void static void
bus_epilog(u32 busNo, bus_epilog(u32 bus_no,
u32 cmd, struct controlvm_message_header *msgHdr, u32 cmd, struct controlvm_message_header *msg_hdr,
int response, BOOL needResponse) int response, BOOL need_response)
{ {
BOOL notified = FALSE; BOOL notified = FALSE;
struct visorchipset_bus_info *pBusInfo = findbus(&bus_info_list, busNo); struct visorchipset_bus_info *bus_info = findbus(&bus_info_list,
bus_no);
if (!pBusInfo) if (!bus_info)
return; return;
if (needResponse) { if (need_response) {
memcpy(&pBusInfo->pending_msg_hdr, msgHdr, memcpy(&bus_info->pending_msg_hdr, msg_hdr,
sizeof(struct controlvm_message_header)); sizeof(struct controlvm_message_header));
} else } else
pBusInfo->pending_msg_hdr.id = CONTROLVM_INVALID; bus_info->pending_msg_hdr.id = CONTROLVM_INVALID;
down(&notifier_lock); down(&notifier_lock);
if (response == CONTROLVM_RESP_SUCCESS) { if (response == CONTROLVM_RESP_SUCCESS) {
...@@ -892,23 +893,23 @@ bus_epilog(u32 busNo, ...@@ -892,23 +893,23 @@ bus_epilog(u32 busNo,
* - BusDev_Client can handle ONLY client * - BusDev_Client can handle ONLY client
* devices */ * devices */
if (BusDev_Server_Notifiers.bus_create) { if (BusDev_Server_Notifiers.bus_create) {
(*BusDev_Server_Notifiers.bus_create) (busNo); (*BusDev_Server_Notifiers.bus_create) (bus_no);
notified = TRUE; notified = TRUE;
} }
if ((!pBusInfo->flags.server) /*client */ && if ((!bus_info->flags.server) /*client */ &&
BusDev_Client_Notifiers.bus_create) { BusDev_Client_Notifiers.bus_create) {
(*BusDev_Client_Notifiers.bus_create) (busNo); (*BusDev_Client_Notifiers.bus_create) (bus_no);
notified = TRUE; notified = TRUE;
} }
break; break;
case CONTROLVM_BUS_DESTROY: case CONTROLVM_BUS_DESTROY:
if (BusDev_Server_Notifiers.bus_destroy) { if (BusDev_Server_Notifiers.bus_destroy) {
(*BusDev_Server_Notifiers.bus_destroy) (busNo); (*BusDev_Server_Notifiers.bus_destroy) (bus_no);
notified = TRUE; notified = TRUE;
} }
if ((!pBusInfo->flags.server) /*client */ && if ((!bus_info->flags.server) /*client */ &&
BusDev_Client_Notifiers.bus_destroy) { BusDev_Client_Notifiers.bus_destroy) {
(*BusDev_Client_Notifiers.bus_destroy) (busNo); (*BusDev_Client_Notifiers.bus_destroy) (bus_no);
notified = TRUE; notified = TRUE;
} }
break; break;
...@@ -921,44 +922,44 @@ bus_epilog(u32 busNo, ...@@ -921,44 +922,44 @@ bus_epilog(u32 busNo,
*/ */
; ;
else else
bus_responder(cmd, busNo, response); bus_responder(cmd, bus_no, response);
up(&notifier_lock); up(&notifier_lock);
} }
static void static void
device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, device_epilog(u32 bus_no, u32 dev_no, struct spar_segment_state state, u32 cmd,
struct controlvm_message_header *msgHdr, int response, struct controlvm_message_header *msg_hdr, int response,
BOOL needResponse, BOOL for_visorbus) BOOL need_response, BOOL for_visorbus)
{ {
struct visorchipset_busdev_notifiers *notifiers = NULL; struct visorchipset_busdev_notifiers *notifiers = NULL;
BOOL notified = FALSE; BOOL notified = FALSE;
struct visorchipset_device_info *pDevInfo = struct visorchipset_device_info *dev_info =
finddevice(&dev_info_list, busNo, devNo); finddevice(&dev_info_list, bus_no, dev_no);
char *envp[] = { char *envp[] = {
"SPARSP_DIAGPOOL_PAUSED_STATE = 1", "SPARSP_DIAGPOOL_PAUSED_STATE = 1",
NULL NULL
}; };
if (!pDevInfo) if (!dev_info)
return; return;
if (for_visorbus) if (for_visorbus)
notifiers = &BusDev_Server_Notifiers; notifiers = &BusDev_Server_Notifiers;
else else
notifiers = &BusDev_Client_Notifiers; notifiers = &BusDev_Client_Notifiers;
if (needResponse) { if (need_response) {
memcpy(&pDevInfo->pending_msg_hdr, msgHdr, memcpy(&dev_info->pending_msg_hdr, msg_hdr,
sizeof(struct controlvm_message_header)); sizeof(struct controlvm_message_header));
} else } else
pDevInfo->pending_msg_hdr.id = CONTROLVM_INVALID; dev_info->pending_msg_hdr.id = CONTROLVM_INVALID;
down(&notifier_lock); down(&notifier_lock);
if (response >= 0) { if (response >= 0) {
switch (cmd) { switch (cmd) {
case CONTROLVM_DEVICE_CREATE: case CONTROLVM_DEVICE_CREATE:
if (notifiers->device_create) { if (notifiers->device_create) {
(*notifiers->device_create) (busNo, devNo); (*notifiers->device_create) (bus_no, dev_no);
notified = TRUE; notified = TRUE;
} }
break; break;
...@@ -968,8 +969,8 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, ...@@ -968,8 +969,8 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd,
state.operating == state.operating ==
segment_state_running.operating) { segment_state_running.operating) {
if (notifiers->device_resume) { if (notifiers->device_resume) {
(*notifiers->device_resume) (busNo, (*notifiers->device_resume) (bus_no,
devNo); dev_no);
notified = TRUE; notified = TRUE;
} }
} }
...@@ -981,8 +982,8 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, ...@@ -981,8 +982,8 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd,
* where server is lost * where server is lost
*/ */
if (notifiers->device_pause) { if (notifiers->device_pause) {
(*notifiers->device_pause) (busNo, (*notifiers->device_pause) (bus_no,
devNo); dev_no);
notified = TRUE; notified = TRUE;
} }
} else if (state.alive == segment_state_paused.alive && } else if (state.alive == segment_state_paused.alive &&
...@@ -991,8 +992,8 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, ...@@ -991,8 +992,8 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd,
/* this is lite pause where channel is /* this is lite pause where channel is
* still valid just 'pause' of it * still valid just 'pause' of it
*/ */
if (busNo == g_diagpool_bus_no && if (bus_no == g_diagpool_bus_no &&
devNo == g_diagpool_dev_no) { dev_no == g_diagpool_dev_no) {
/* this will trigger the /* this will trigger the
* diag_shutdown.sh script in * diag_shutdown.sh script in
* the visorchipset hotplug */ * the visorchipset hotplug */
...@@ -1004,7 +1005,7 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, ...@@ -1004,7 +1005,7 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd,
break; break;
case CONTROLVM_DEVICE_DESTROY: case CONTROLVM_DEVICE_DESTROY:
if (notifiers->device_destroy) { if (notifiers->device_destroy) {
(*notifiers->device_destroy) (busNo, devNo); (*notifiers->device_destroy) (bus_no, dev_no);
notified = TRUE; notified = TRUE;
} }
break; break;
...@@ -1017,7 +1018,7 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, ...@@ -1017,7 +1018,7 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd,
*/ */
; ;
else else
device_responder(cmd, busNo, devNo, response); device_responder(cmd, bus_no, dev_no, response);
up(&notifier_lock); up(&notifier_lock);
} }
......
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