From 2df7cc6267035c2da2f5e92fe632356178735825 Mon Sep 17 00:00:00 2001 From: Benjamin Romer Date: Fri, 3 Oct 2014 14:08:47 -0400 Subject: [PATCH] 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: Benjamin Romer Signed-off-by: Greg Kroah-Hartman --- drivers/staging/unisys/include/uisutils.h | 6 ++--- drivers/staging/unisys/uislib/uislib.c | 30 +++++++++++------------ drivers/staging/unisys/uislib/uisutils.c | 8 +++--- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/staging/unisys/include/uisutils.h b/drivers/staging/unisys/include/uisutils.h index 74e7cf65502c..85d49e4860a6 100644 --- a/drivers/staging/unisys/include/uisutils.h +++ b/drivers/staging/unisys/include/uisutils.h @@ -43,9 +43,9 @@ /* global function pointers that act as callback functions into * uisnicmod, uissdmod, and virtpcimod */ -extern int (*UisnicControlChanFunc)(struct io_msgs *); -extern int (*UissdControlChanFunc)(struct io_msgs *); -extern int (*VirtControlChanFunc)(struct guest_msgs *); +extern int (*uisnic_control_chan_func)(struct io_msgs *); +extern int (*uissd_control_chan_func)(struct io_msgs *); +extern int (*virt_control_chan_func)(struct guest_msgs *); /* Return values of above callback functions: */ #define CCF_ERROR 0 /* completed and failed */ diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c index f7f855538d80..b48b962165ff 100644 --- a/drivers/staging/unisys/uislib/uislib.c +++ b/drivers/staging/unisys/uislib/uislib.c @@ -57,7 +57,7 @@ #define __MYFILE__ "uislib.c" /* 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 char *ProcReadBuffer; /* Note this MUST be global, @@ -238,14 +238,14 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf) cmd.add_vbus.dev_count = deviceCount; cmd.add_vbus.bus_uuid = msg->cmd.createBus.busDataTypeGuid; 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."); POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus->bus_no, POSTCODE_SEVERITY_ERR); kfree(bus); 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."); POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus->bus_no, POSTCODE_SEVERITY_ERR); @@ -316,11 +316,11 @@ destroy_bus(CONTROLVM_MESSAGE *msg, char *buf) with this bus. */ cmd.msgtype = GUEST_DEL_VBUS; cmd.del_vbus.bus_no = busNo; - if (!VirtControlChanFunc) { + if (!virt_control_chan_func) { LOGERR("CONTROLVM_BUS_DESTROY Failed: virtpci callback not registered."); 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."); return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR; } @@ -500,7 +500,7 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf) goto Away; } - if (!VirtControlChanFunc) { + if (!virt_control_chan_func) { LOGERR("CONTROLVM_DEVICE_CREATE Failed: virtpci callback not registered."); POSTCODE_LINUX_4 (DEVICE_CREATE_FAILURE_PC, devNo, @@ -509,7 +509,7 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf) goto Away; } - if (!VirtControlChanFunc(&cmd)) { + if (!virt_control_chan_func(&cmd)) { LOGERR("CONTROLVM_DEVICE_CREATE Failed: virtpci GUEST_ADD_[VHBA||VNIC] returned error."); POSTCODE_LINUX_4 (DEVICE_CREATE_FAILURE_PC, devNo, @@ -596,11 +596,11 @@ pause_device(CONTROLVM_MESSAGE *msg) LOGERR("CONTROLVM_DEVICE_CHANGESTATE:pause Failed: unknown channelTypeGuid.\n"); return CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN; } - if (!VirtControlChanFunc) { + if (!virt_control_chan_func) { LOGERR("CONTROLVM_DEVICE_CHANGESTATE Failed: virtpci callback not registered."); 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."); return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR; @@ -665,11 +665,11 @@ resume_device(CONTROLVM_MESSAGE *msg) LOGERR("CONTROLVM_DEVICE_CHANGESTATE:resume Failed: unknown channelTypeGuid.\n"); return CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN; } - if (!VirtControlChanFunc) { + if (!virt_control_chan_func) { LOGERR("CONTROLVM_DEVICE_CHANGESTATE Failed: virtpci callback not registered."); 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."); return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR; @@ -736,12 +736,12 @@ destroy_device(CONTROLVM_MESSAGE *msg, char *buf) return CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN; } - if (!VirtControlChanFunc) { + if (!virt_control_chan_func) { LOGERR("CONTROLVM_DEVICE_DESTORY Failed: virtpci callback not registered."); return 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."); return CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR; @@ -783,7 +783,7 @@ init_chipset(CONTROLVM_MESSAGE *msg, char *buf) * functions. */ if (!msg->hdr.Flags.testMessage) - WAIT_ON_CALLBACK(VirtControlChanFunc); + WAIT_ON_CALLBACK(virt_control_chan_func); chipset_inited = 1; POSTCODE_LINUX_2(CHIPSET_INIT_EXIT_PC, POSTCODE_SEVERITY_INFO); @@ -1574,7 +1574,7 @@ uislib_mod_init(void) BusListHead = NULL; BusListCount = MaxBusCount = 0; rwlock_init(&BusListLock); - VirtControlChanFunc = NULL; + virt_control_chan_func = NULL; /* Issue VMCALL_GET_CONTROLVM_ADDR to get CtrlChanPhysAddr and * then map this physical address to a virtual address. */ diff --git a/drivers/staging/unisys/uislib/uisutils.c b/drivers/staging/unisys/uislib/uisutils.c index 8ff6d26ff00b..3001819aba96 100644 --- a/drivers/staging/unisys/uislib/uisutils.c +++ b/drivers/staging/unisys/uislib/uisutils.c @@ -82,13 +82,13 @@ uisctrl_register_req_handler(int type, void *fptr, switch (type) { case 2: if (fptr) { - if (!VirtControlChanFunc) + if (!virt_control_chan_func) atomic_inc(&UisUtils_Registered_Services); - VirtControlChanFunc = fptr; + virt_control_chan_func = fptr; } else { - if (VirtControlChanFunc) + if (virt_control_chan_func) atomic_dec(&UisUtils_Registered_Services); - VirtControlChanFunc = NULL; + virt_control_chan_func = NULL; } break; -- 2.34.1