staging: unisys: Fix CamelCase function pointers in uisutils
authorBenjamin Romer <benjamin.romer@unisys.com>
Fri, 3 Oct 2014 18:08:47 +0000 (14:08 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Oct 2014 02:29:03 +0000 (10:29 +0800)
Fix CamelCase names:
UisnicControlChanFunc => uisnic_control_chan_func
UissdControlChanFunc => uissd_control_chan_func
VirtControlChanFunc => virt_control_chan_func

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/include/uisutils.h
drivers/staging/unisys/uislib/uislib.c
drivers/staging/unisys/uislib/uisutils.c

index 74e7cf65502c7208880b57c16e760dd30fb03670..85d49e4860a6a77f6c84c6194286fb810174d6c3 100644 (file)
@@ -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 */
index f7f855538d8082c4b45cd99033e6e8aab4a5cb77..b48b962165ff18d70d53c2429b91c336772fbcb2 100644 (file)
@@ -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. */
index 8ff6d26ff00b957c11175cbe2fa445961bcacd2f..3001819aba96f231ad6f16281137358bb4fd17cc 100644 (file)
@@ -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;