Commit 2df7cc62 authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman

staging: unisys: Fix CamelCase function pointers in uisutils

Fix CamelCase names:
UisnicControlChanFunc => uisnic_control_chan_func
UissdControlChanFunc => uissd_control_chan_func
VirtControlChanFunc => virt_control_chan_func
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 34e6230b
...@@ -43,9 +43,9 @@ ...@@ -43,9 +43,9 @@
/* global function pointers that act as callback functions into /* global function pointers that act as callback functions into
* uisnicmod, uissdmod, and virtpcimod * uisnicmod, uissdmod, and virtpcimod
*/ */
extern int (*UisnicControlChanFunc)(struct io_msgs *); extern int (*uisnic_control_chan_func)(struct io_msgs *);
extern int (*UissdControlChanFunc)(struct io_msgs *); extern int (*uissd_control_chan_func)(struct io_msgs *);
extern int (*VirtControlChanFunc)(struct guest_msgs *); extern int (*virt_control_chan_func)(struct guest_msgs *);
/* Return values of above callback functions: */ /* Return values of above callback functions: */
#define CCF_ERROR 0 /* completed and failed */ #define CCF_ERROR 0 /* completed and failed */
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
#define __MYFILE__ "uislib.c" #define __MYFILE__ "uislib.c"
/* global function pointers that act as callback functions into virtpcimod */ /* global function pointers that act as callback functions into virtpcimod */
int (*VirtControlChanFunc)(struct guest_msgs *); int (*virt_control_chan_func)(struct guest_msgs *);
static int ProcReadBufferValid; static int ProcReadBufferValid;
static char *ProcReadBuffer; /* Note this MUST be global, static char *ProcReadBuffer; /* Note this MUST be global,
...@@ -238,14 +238,14 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -238,14 +238,14 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf)
cmd.add_vbus.dev_count = deviceCount; cmd.add_vbus.dev_count = deviceCount;
cmd.add_vbus.bus_uuid = msg->cmd.createBus.busDataTypeGuid; cmd.add_vbus.bus_uuid = msg->cmd.createBus.busDataTypeGuid;
cmd.add_vbus.instance_uuid = msg->cmd.createBus.busInstGuid; cmd.add_vbus.instance_uuid = msg->cmd.createBus.busInstGuid;
if (!VirtControlChanFunc) { if (!virt_control_chan_func) {
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->bus_no, 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 (!virt_control_chan_func(&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->bus_no, POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus->bus_no,
POSTCODE_SEVERITY_ERR); POSTCODE_SEVERITY_ERR);
...@@ -316,11 +316,11 @@ destroy_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -316,11 +316,11 @@ destroy_bus(CONTROLVM_MESSAGE *msg, char *buf)
with this bus. */ with this bus. */
cmd.msgtype = GUEST_DEL_VBUS; cmd.msgtype = GUEST_DEL_VBUS;
cmd.del_vbus.bus_no = busNo; cmd.del_vbus.bus_no = busNo;
if (!VirtControlChanFunc) { if (!virt_control_chan_func) {
LOGERR("CONTROLVM_BUS_DESTROY Failed: virtpci callback not registered."); LOGERR("CONTROLVM_BUS_DESTROY Failed: virtpci callback not registered.");
return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE; return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE;
} }
if (!VirtControlChanFunc(&cmd)) { if (!virt_control_chan_func(&cmd)) {
LOGERR("CONTROLVM_BUS_DESTROY Failed: virtpci GUEST_DEL_VBUS returned error."); LOGERR("CONTROLVM_BUS_DESTROY Failed: virtpci GUEST_DEL_VBUS returned error.");
return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR; return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR;
} }
...@@ -500,7 +500,7 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -500,7 +500,7 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
goto Away; goto Away;
} }
if (!VirtControlChanFunc) { if (!virt_control_chan_func) {
LOGERR("CONTROLVM_DEVICE_CREATE Failed: virtpci callback not registered."); LOGERR("CONTROLVM_DEVICE_CREATE Failed: virtpci callback not registered.");
POSTCODE_LINUX_4 POSTCODE_LINUX_4
(DEVICE_CREATE_FAILURE_PC, devNo, (DEVICE_CREATE_FAILURE_PC, devNo,
...@@ -509,7 +509,7 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -509,7 +509,7 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
goto Away; goto Away;
} }
if (!VirtControlChanFunc(&cmd)) { if (!virt_control_chan_func(&cmd)) {
LOGERR("CONTROLVM_DEVICE_CREATE Failed: virtpci GUEST_ADD_[VHBA||VNIC] returned error."); LOGERR("CONTROLVM_DEVICE_CREATE Failed: virtpci GUEST_ADD_[VHBA||VNIC] returned error.");
POSTCODE_LINUX_4 POSTCODE_LINUX_4
(DEVICE_CREATE_FAILURE_PC, devNo, (DEVICE_CREATE_FAILURE_PC, devNo,
...@@ -596,11 +596,11 @@ pause_device(CONTROLVM_MESSAGE *msg) ...@@ -596,11 +596,11 @@ pause_device(CONTROLVM_MESSAGE *msg)
LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: unknown channelTypeGuid.\n"); LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: unknown channelTypeGuid.\n");
return CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN; return CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN;
} }
if (!VirtControlChanFunc) { if (!virt_control_chan_func) {
LOGERR("CONTROLVM_DEVICE_CHANGESTATE Failed: virtpci callback not registered."); LOGERR("CONTROLVM_DEVICE_CHANGESTATE Failed: virtpci callback not registered.");
return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE; return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE;
} }
if (!VirtControlChanFunc(&cmd)) { if (!virt_control_chan_func(&cmd)) {
LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: virtpci GUEST_PAUSE_[VHBA||VNIC] returned error."); LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: virtpci GUEST_PAUSE_[VHBA||VNIC] returned error.");
return return
CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR; CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR;
...@@ -665,11 +665,11 @@ resume_device(CONTROLVM_MESSAGE *msg) ...@@ -665,11 +665,11 @@ resume_device(CONTROLVM_MESSAGE *msg)
LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: unknown channelTypeGuid.\n"); LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: unknown channelTypeGuid.\n");
return CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN; return CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN;
} }
if (!VirtControlChanFunc) { if (!virt_control_chan_func) {
LOGERR("CONTROLVM_DEVICE_CHANGESTATE Failed: virtpci callback not registered."); LOGERR("CONTROLVM_DEVICE_CHANGESTATE Failed: virtpci callback not registered.");
return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE; return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE;
} }
if (!VirtControlChanFunc(&cmd)) { if (!virt_control_chan_func(&cmd)) {
LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: virtpci GUEST_RESUME_[VHBA||VNIC] returned error."); LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: virtpci GUEST_RESUME_[VHBA||VNIC] returned error.");
return return
CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR; CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR;
...@@ -736,12 +736,12 @@ destroy_device(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -736,12 +736,12 @@ destroy_device(CONTROLVM_MESSAGE *msg, char *buf)
return return
CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN; CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN;
} }
if (!VirtControlChanFunc) { if (!virt_control_chan_func) {
LOGERR("CONTROLVM_DEVICE_DESTORY Failed: virtpci callback not registered."); LOGERR("CONTROLVM_DEVICE_DESTORY Failed: virtpci callback not registered.");
return return
CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE; CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE;
} }
if (!VirtControlChanFunc(&cmd)) { if (!virt_control_chan_func(&cmd)) {
LOGERR("CONTROLVM_DEVICE_DESTROY Failed: virtpci GUEST_DEL_[VHBA||VNIC] returned error."); LOGERR("CONTROLVM_DEVICE_DESTROY Failed: virtpci GUEST_DEL_[VHBA||VNIC] returned error.");
return return
CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR; CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR;
...@@ -783,7 +783,7 @@ init_chipset(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -783,7 +783,7 @@ init_chipset(CONTROLVM_MESSAGE *msg, char *buf)
* functions. * functions.
*/ */
if (!msg->hdr.Flags.testMessage) if (!msg->hdr.Flags.testMessage)
WAIT_ON_CALLBACK(VirtControlChanFunc); WAIT_ON_CALLBACK(virt_control_chan_func);
chipset_inited = 1; chipset_inited = 1;
POSTCODE_LINUX_2(CHIPSET_INIT_EXIT_PC, POSTCODE_SEVERITY_INFO); POSTCODE_LINUX_2(CHIPSET_INIT_EXIT_PC, POSTCODE_SEVERITY_INFO);
...@@ -1574,7 +1574,7 @@ uislib_mod_init(void) ...@@ -1574,7 +1574,7 @@ uislib_mod_init(void)
BusListHead = NULL; BusListHead = NULL;
BusListCount = MaxBusCount = 0; BusListCount = MaxBusCount = 0;
rwlock_init(&BusListLock); rwlock_init(&BusListLock);
VirtControlChanFunc = NULL; virt_control_chan_func = NULL;
/* Issue VMCALL_GET_CONTROLVM_ADDR to get CtrlChanPhysAddr and /* Issue VMCALL_GET_CONTROLVM_ADDR to get CtrlChanPhysAddr and
* then map this physical address to a virtual address. */ * then map this physical address to a virtual address. */
......
...@@ -82,13 +82,13 @@ uisctrl_register_req_handler(int type, void *fptr, ...@@ -82,13 +82,13 @@ uisctrl_register_req_handler(int type, void *fptr,
switch (type) { switch (type) {
case 2: case 2:
if (fptr) { if (fptr) {
if (!VirtControlChanFunc) if (!virt_control_chan_func)
atomic_inc(&UisUtils_Registered_Services); atomic_inc(&UisUtils_Registered_Services);
VirtControlChanFunc = fptr; virt_control_chan_func = fptr;
} else { } else {
if (VirtControlChanFunc) if (virt_control_chan_func)
atomic_dec(&UisUtils_Registered_Services); atomic_dec(&UisUtils_Registered_Services);
VirtControlChanFunc = NULL; virt_control_chan_func = NULL;
} }
break; break;
......
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