Fix as many checkpatch.pl strict warnings and checks as possible in uisutils.h,
as well as correcting references to renamed variables, structures, and
functions.

The remaining warnings are because of camel-cased members in structures defined
by other files. These will be corrected in subsequent patches when those
structures are corrected.

Signed-off-by: Benjamin Romer <benjamin.ro...@unisys.com>
---
 drivers/staging/unisys/include/uisqueue.h          |   4 +-
 drivers/staging/unisys/include/uisutils.h          | 147 +++++++++++----------
 drivers/staging/unisys/uislib/uislib.c             |  38 +++---
 drivers/staging/unisys/uislib/uisutils.c           | 114 ++++++++--------
 drivers/staging/unisys/visorchipset/file.c         |   4 +-
 .../unisys/visorchipset/visorchipset_main.c        |   2 +-
 6 files changed, 159 insertions(+), 150 deletions(-)

diff --git a/drivers/staging/unisys/include/uisqueue.h 
b/drivers/staging/unisys/include/uisqueue.h
index b649b35..2da419d 100644
--- a/drivers/staging/unisys/include/uisqueue.h
+++ b/drivers/staging/unisys/include/uisqueue.h
@@ -199,7 +199,7 @@ struct network_policy {
 };
 
 /*
- * IO messages sent to UisnicControlChanFunc & UissdControlChanFunc by
+ * IO messages sent to uisnic_control_chan_func & uissd_control_chan_func by
  * code that processes the ControlVm channel messages.
  */
 
@@ -328,7 +328,7 @@ struct io_msgs {
 };
 
 /*
-* Guest messages sent to VirtControlChanFunc by code that processes
+* Guest messages sent to virt_control_chan_func by code that processes
 * the ControlVm channel messages.
 */
 
diff --git a/drivers/staging/unisys/include/uisutils.h 
b/drivers/staging/unisys/include/uisutils.h
index f1a1b0d..e0143e9 100644
--- a/drivers/staging/unisys/include/uisutils.h
+++ b/drivers/staging/unisys/include/uisutils.h
@@ -43,39 +43,40 @@
 /* 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 */
 #define CCF_OK           1     /* completed successfully */
 #define CCF_PENDING      2     /* operation still pending */
-extern atomic_t UisUtils_Registered_Services;
+extern atomic_t uisutils_registered_services;
 
-typedef unsigned int MACARRAY[MAX_MACADDR_LEN];
-typedef struct ReqHandlerInfo_struct {
-       uuid_le switchTypeGuid;
+struct req_handler_info {
+       uuid_le switch_type_guid;
        int (*controlfunc)(struct io_msgs *);
        unsigned long min_channel_bytes;
-       int (*Server_Channel_Ok)(unsigned long channelBytes);
-       int (*Server_Channel_Init)
-        (void *x, unsigned char *clientStr, u32 clientStrLen, u64 bytes);
+       int (*server_channel_ok)(unsigned long channel_bytes);
+       int (*server_channel_init)(void *x, unsigned char *client_str,
+                                  u32 client_str_len, u64 bytes);
        char switch_type_name[99];
        struct list_head list_link;     /* links into ReqHandlerInfo_list */
-} ReqHandlerInfo_t;
-
-ReqHandlerInfo_t *ReqHandlerAdd(uuid_le switchTypeGuid,
-                               const char *switch_type_name,
-                               int (*controlfunc)(struct io_msgs *),
-                               unsigned long min_channel_bytes,
-                               int (*Server_Channel_Ok)(unsigned long
-                                                        channelBytes),
-                               int (*Server_Channel_Init)
-                                (void *x, unsigned char *clientStr,
-                                 u32 clientStrLen, u64 bytes));
-ReqHandlerInfo_t *ReqHandlerFind(uuid_le switchTypeGuid);
-int ReqHandlerDel(uuid_le switchTypeGuid);
+};
+
+struct req_handler_info *req_handler_add(uuid_le switch_type_guid,
+                                        const char *switch_type_name,
+                                        int (*controlfunc)(struct io_msgs *),
+                                        unsigned long min_channel_bytes,
+                                        int (*server_channel_ok)
+                                               (unsigned long channel_bytes),
+                                        int (*server_channel_init)
+                                               (void *x,
+                                                unsigned char *client_str,
+                                                u32 client_str_len,
+                                                u64 bytes));
+struct req_handler_info *req_handler_find(uuid_le switch_type_guid);
+int req_handler_del(uuid_le switch_type_guid);
 
 #define uislib_ioremap_cache(addr, size) \
        dbg_ioremap_cache(addr, size, __FILE__, __LINE__)
@@ -114,46 +115,47 @@ int uisutil_add_proc_line_ex(int *total, char **buffer, 
int *buffer_remaining,
                             char *format, ...);
 
 int uisctrl_register_req_handler(int type, void *fptr,
-                                ULTRA_VBUS_DEVICEINFO *chipset_DriverInfo);
-int uisctrl_register_req_handler_ex(uuid_le switchTypeGuid,
+                                ULTRA_VBUS_DEVICEINFO *chipset_driver_info);
+int uisctrl_register_req_handler_ex(uuid_le switch_type_guid,
                                    const char *switch_type_name,
                                    int (*fptr)(struct io_msgs *),
                                    unsigned long min_channel_bytes,
-                                   int (*Server_Channel_Ok)(unsigned long
-                                                            channelBytes),
-                                   int (*Server_Channel_Init)
-                                   (void *x, unsigned char *clientStr,
-                                    u32 clientStrLen, u64 bytes),
-                                   ULTRA_VBUS_DEVICEINFO *chipset_DriverInfo);
-
-int uisctrl_unregister_req_handler_ex(uuid_le switchTypeGuid);
+                                   int (*server_channel_ok)(unsigned long
+                                                            channel_bytes),
+                                   int (*server_channel_init)
+                                   (void *x, unsigned char *client_str,
+                                    u32 client_str_len, u64 bytes),
+                                   ULTRA_VBUS_DEVICEINFO *chipset_driver_info);
+
+int uisctrl_unregister_req_handler_ex(uuid_le switch_type_guid);
 unsigned char *util_map_virt(struct phys_info *sg);
 void util_unmap_virt(struct phys_info *sg);
 unsigned char *util_map_virt_atomic(struct phys_info *sg);
 void util_unmap_virt_atomic(void *buf);
-int uislib_server_inject_add_vnic(u32 switchNo, u32 BusNo, u32 numIntPorts,
-                                 u32 numExtPorts, MACARRAY pmac[],
+int uislib_server_inject_add_vnic(u32 switch_no, u32 bus_no, u32 num_int_ports,
+                                 u32 num_ext_ports,
+                                 unsigned int **pmac,
                                  pCHANNEL_HEADER **chan);
-void uislib_server_inject_del_vnic(u32 switchNo, u32 busNo, u32 numIntPorts,
-                                  u32 numExtPorts);
-int uislib_client_inject_add_bus(u32 busNo, uuid_le instGuid,
-                                u64 channelAddr, ulong nChannelBytes);
-int  uislib_client_inject_del_bus(u32 busNo);
+void uislib_server_inject_del_vnic(u32 switch_no, u32 bus_no, u32 
num_int_ports,
+                                  u32 num_ext_ports);
+int uislib_client_inject_add_bus(u32 bus_no, uuid_le inst_guid,
+                                u64 channel_addr, ulong n_channel_bytes);
+int  uislib_client_inject_del_bus(u32 bus_no);
 
-int uislib_client_inject_add_vhba(u32 busNo, u32 devNo,
+int uislib_client_inject_add_vhba(u32 bus_no, u32 dev_no,
                                  u64 phys_chan_addr, u32 chan_bytes,
-                                 int is_test_addr, uuid_le instGuid,
+                                 int is_test_addr, uuid_le inst_guid,
                                  struct InterruptInfo *intr);
-int  uislib_client_inject_pause_vhba(u32 busNo, u32 devNo);
-int  uislib_client_inject_resume_vhba(u32 busNo, u32 devNo);
-int uislib_client_inject_del_vhba(u32 busNo, u32 devNo);
-int uislib_client_inject_add_vnic(u32 busNo, u32 devNo,
+int  uislib_client_inject_pause_vhba(u32 bus_no, u32 dev_no);
+int  uislib_client_inject_resume_vhba(u32 bus_no, u32 dev_no);
+int uislib_client_inject_del_vhba(u32 bus_no, u32 dev_no);
+int uislib_client_inject_add_vnic(u32 bus_no, u32 dev_no,
                                  u64 phys_chan_addr, u32 chan_bytes,
-                                 int is_test_addr, uuid_le instGuid,
+                                 int is_test_addr, uuid_le inst_guid,
                                  struct InterruptInfo *intr);
-int uislib_client_inject_pause_vnic(u32 busNo, u32 devNo);
-int uislib_client_inject_resume_vnic(u32 busNo, u32 devNo);
-int uislib_client_inject_del_vnic(u32 busNo, u32 devNo);
+int uislib_client_inject_pause_vnic(u32 bus_no, u32 dev_no);
+int uislib_client_inject_resume_vnic(u32 bus_no, u32 dev_no);
+int uislib_client_inject_del_vnic(u32 bus_no, u32 dev_no);
 #ifdef STORAGE_CHANNEL
 u64 uislib_storage_channel(int client_id);
 #endif
@@ -182,11 +184,14 @@ struct chaninfo {
        set_current_state(TASK_INTERRUPTIBLE); \
        schedule_timeout(msecs_to_jiffies(x)); \
 }
+
 #define UIS_THREAD_WAIT_USEC(x) { \
        set_current_state(TASK_INTERRUPTIBLE); \
        schedule_timeout(usecs_to_jiffies(x)); \
 }
+
 #define UIS_THREAD_WAIT UIS_THREAD_WAIT_MSEC(5)
+
 #define UIS_THREAD_WAIT_SEC(x) { \
        set_current_state(TASK_INTERRUPTIBLE); \
        schedule_timeout((x)*HZ); \
@@ -222,7 +227,7 @@ unsigned int uisutil_copy_fragsinfo_from_skb(unsigned char 
*calling_ctx,
                                             struct phys_info frags[]);
 
 static inline unsigned int
-Issue_VMCALL_IO_CONTROLVM_ADDR(u64 *ControlAddress, u32 *ControlBytes)
+issue_vmcall_io_controlvm_addr(u64 *control_address, u32 *control_bytes)
 {
        VMCALL_IO_CONTROLVM_ADDR_PARAMS params;
        int result = VMCALL_SUCCESS;
@@ -231,13 +236,13 @@ Issue_VMCALL_IO_CONTROLVM_ADDR(u64 *ControlAddress, u32 
*ControlBytes)
        physaddr = virt_to_phys(&params);
        ISSUE_IO_VMCALL(VMCALL_IO_CONTROLVM_ADDR, physaddr, result);
        if (VMCALL_SUCCESSFUL(result)) {
-               *ControlAddress = params.ChannelAddress;
-               *ControlBytes = params.ChannelBytes;
+               *control_address = params.ChannelAddress;
+               *control_bytes = params.ChannelBytes;
        }
        return result;
 }
 
-static inline unsigned int Issue_VMCALL_IO_DIAG_ADDR(u64 *DiagChannelAddress)
+static inline unsigned int issue_vmcall_io_diag_addr(u64 *channel_address)
 {
        VMCALL_IO_DIAG_ADDR_PARAMS params;
        int result = VMCALL_SUCCESS;
@@ -246,12 +251,12 @@ static inline unsigned int Issue_VMCALL_IO_DIAG_ADDR(u64 
*DiagChannelAddress)
        physaddr = virt_to_phys(&params);
        ISSUE_IO_VMCALL(VMCALL_IO_DIAG_ADDR, physaddr, result);
        if (VMCALL_SUCCESSFUL(result))
-               *DiagChannelAddress = params.ChannelAddress;
+               *channel_address = params.ChannelAddress;
        return result;
 }
 
 static inline unsigned int
-Issue_VMCALL_IO_VISORSERIAL_ADDR(u64 *DiagChannelAddress)
+issue_vmcall_io_visorserial_addr(u64 *channel_address)
 {
        VMCALL_IO_VISORSERIAL_ADDR_PARAMS params;
        int result = VMCALL_SUCCESS;
@@ -260,11 +265,11 @@ Issue_VMCALL_IO_VISORSERIAL_ADDR(u64 *DiagChannelAddress)
        physaddr = virt_to_phys(&params);
        ISSUE_IO_VMCALL(VMCALL_IO_VISORSERIAL_ADDR, physaddr, result);
        if (VMCALL_SUCCESSFUL(result))
-               *DiagChannelAddress = params.ChannelAddress;
+               *channel_address = params.ChannelAddress;
        return result;
 }
 
-static inline s64 Issue_VMCALL_QUERY_GUEST_VIRTUAL_TIME_OFFSET(void)
+static inline s64 issue_vmcall_query_guest_virtual_time_offset(void)
 {
        u64 result = VMCALL_SUCCESS;
        u64 physaddr = 0;
@@ -274,7 +279,7 @@ static inline s64 
Issue_VMCALL_QUERY_GUEST_VIRTUAL_TIME_OFFSET(void)
        return result;
 }
 
-static inline s64 Issue_VMCALL_MEASUREMENT_DO_NOTHING(void)
+static inline s64 issue_vmcall_measurement_do_nothing(void)
 {
        u64 result = VMCALL_SUCCESS;
        u64 physaddr = 0;
@@ -284,14 +289,14 @@ static inline s64 
Issue_VMCALL_MEASUREMENT_DO_NOTHING(void)
 }
 
 struct log_info_t {
-       volatile unsigned long long last_cycles;
+       unsigned long long last_cycles;
        unsigned long long delta_sum[64];
        unsigned long long delta_cnt[64];
        unsigned long long max_delta[64];
        unsigned long long min_delta[64];
 };
 
-static inline int Issue_VMCALL_UPDATE_PHYSICAL_TIME(u64 adjustment)
+static inline int issue_vmcall_update_physical_time(u64 adjustment)
 {
        int result = VMCALL_SUCCESS;
 
@@ -300,20 +305,20 @@ static inline int Issue_VMCALL_UPDATE_PHYSICAL_TIME(u64 
adjustment)
 }
 
 static inline unsigned int
-Issue_VMCALL_CHANNEL_MISMATCH(const char *ChannelName,
-                             const char *ItemName,
-                             u32 SourceLineNumber, const char *path_n_fn)
+issue_vmcall_channel_mismatch(const char *channel_name,
+                             const char *item_name,
+                             u32 line_no, const char *path_n_fn)
 {
        VMCALL_CHANNEL_VERSION_MISMATCH_PARAMS params;
        int result = VMCALL_SUCCESS;
        u64 physaddr;
        char *last_slash = NULL;
 
-       strlcpy(params.ChannelName, ChannelName,
+       strlcpy(params.ChannelName, channel_name,
                lengthof(VMCALL_CHANNEL_VERSION_MISMATCH_PARAMS, ChannelName));
-       strlcpy(params.ItemName, ItemName,
+       strlcpy(params.ItemName, item_name,
                lengthof(VMCALL_CHANNEL_VERSION_MISMATCH_PARAMS, ItemName));
-       params.SourceLineNumber = SourceLineNumber;
+       params.SourceLineNumber = line_no;
 
        last_slash = strrchr(path_n_fn, '/');
        if (last_slash != NULL) {
@@ -332,7 +337,7 @@ Issue_VMCALL_CHANNEL_MISMATCH(const char *ChannelName,
        return result;
 }
 
-static inline unsigned int Issue_VMCALL_FATAL_BYE_BYE(void)
+static inline unsigned int issue_vmcall_fatal_bye_bye(void)
 {
        int result = VMCALL_SUCCESS;
        u64 physaddr = 0;
@@ -349,10 +354,10 @@ void uislib_cache_free(struct kmem_cache *cur_pool, void 
*p, char *fn, int ln);
 #define UISCACHEFREE(cur_pool, p) \
        uislib_cache_free(cur_pool, p, __FILE__, __LINE__)
 
-void uislib_enable_channel_interrupts(u32 busNo, u32 devNo,
+void uislib_enable_channel_interrupts(u32 bus_no, u32 dev_no,
                                      int (*interrupt)(void *),
                                      void *interrupt_context);
-void uislib_disable_channel_interrupts(u32 busNo, u32 devNo);
-void uislib_force_channel_interrupt(u32 busNo, u32 devNo);
+void uislib_disable_channel_interrupts(u32 bus_no, u32 dev_no);
+void uislib_force_channel_interrupt(u32 bus_no, u32 dev_no);
 
 #endif /* __UISUTILS__H__ */
diff --git a/drivers/staging/unisys/uislib/uislib.c 
b/drivers/staging/unisys/uislib/uislib.c
index 1823f6f..5803641 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.deviceCount = deviceCount;
                cmd.add_vbus.busTypeGuid = msg->cmd.createBus.busDataTypeGuid;
                cmd.add_vbus.busInstGuid = 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->busNo,
                                         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->busNo,
                                         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.busNo = 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;
        }
@@ -352,7 +352,7 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
        u32 busNo, devNo;
        int result = CONTROLVM_RESP_SUCCESS;
        u64 minSize = MIN_IO_CHANNEL_SIZE;
-       ReqHandlerInfo_t *pReqHandler;
+       struct req_handler_info *pReqHandler;
 
        busNo = msg->cmd.createDevice.busNo;
        devNo = msg->cmd.createDevice.devNo;
@@ -379,7 +379,7 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
        if (msg->hdr.Flags.testMessage)
                dev->chanptr = (void __iomem *)__va(dev->channelAddr);
        else {
-               pReqHandler = ReqHandlerFind(dev->channelTypeGuid);
+               pReqHandler = req_handler_find(dev->channelTypeGuid);
                if (pReqHandler)
                        /* generic service handler registered for this
                         * channel
@@ -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);
@@ -1231,8 +1231,8 @@ info_debugfs_read_helper(char **buff, int *buff_len)
        }
        read_unlock(&BusListLock);
 
-       if (PLINE("UisUtils_Registered_Services: %d\n",
-                 atomic_read(&UisUtils_Registered_Services)) < 0)
+       if (PLINE("uisutils_registered_services: %d\n",
+                 atomic_read(&uisutils_registered_services)) < 0)
                goto err_done;
        if (PLINE("cycles_before_wait %llu wait_cycles:%llu\n",
                  cycles_before_wait, wait_cycles) < 0)
@@ -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 d175d03..bf97ae9 100644
--- a/drivers/staging/unisys/uislib/uisutils.c
+++ b/drivers/staging/unisys/uislib/uisutils.c
@@ -39,7 +39,7 @@
 #define __MYFILE__ "uisutils.c"
 
 /* exports */
-atomic_t UisUtils_Registered_Services = ATOMIC_INIT(0);
+atomic_t uisutils_registered_services = ATOMIC_INIT(0);
                                        /* num registrations via
                                         * uisctrl_register_req_handler() or
                                         * uisctrl_register_req_handler_ex() */
@@ -75,20 +75,20 @@ EXPORT_SYMBOL_GPL(uisutil_add_proc_line_ex);
 
 int
 uisctrl_register_req_handler(int type, void *fptr,
-                            ULTRA_VBUS_DEVICEINFO *chipset_DriverInfo)
+                            ULTRA_VBUS_DEVICEINFO *chipset_driver_info)
 {
        LOGINF("type = %d, fptr = 0x%p.\n", type, fptr);
 
        switch (type) {
        case 2:
                if (fptr) {
-                       if (!VirtControlChanFunc)
-                               atomic_inc(&UisUtils_Registered_Services);
-                       VirtControlChanFunc = fptr;
+                       if (!virt_control_chan_func)
+                               atomic_inc(&uisutils_registered_services);
+                       virt_control_chan_func = fptr;
                } else {
-                       if (VirtControlChanFunc)
-                               atomic_dec(&UisUtils_Registered_Services);
-                       VirtControlChanFunc = NULL;
+                       if (virt_control_chan_func)
+                               atomic_dec(&uisutils_registered_services);
+                       virt_control_chan_func = NULL;
                }
                break;
 
@@ -96,8 +96,8 @@ uisctrl_register_req_handler(int type, void *fptr,
                LOGERR("invalid type %d.\n", type);
                return 0;
        }
-       if (chipset_DriverInfo)
-               BusDeviceInfo_Init(chipset_DriverInfo, "chipset", "uislib",
+       if (chipset_driver_info)
+               BusDeviceInfo_Init(chipset_driver_info, "chipset", "uislib",
                                   VERSION, NULL);
 
        return 1;
@@ -105,76 +105,78 @@ uisctrl_register_req_handler(int type, void *fptr,
 EXPORT_SYMBOL_GPL(uisctrl_register_req_handler);
 
 int
-uisctrl_register_req_handler_ex(uuid_le switchTypeGuid,
+uisctrl_register_req_handler_ex(uuid_le switch_type_guid,
                                const char *switch_type_name,
                                int (*controlfunc)(struct io_msgs *),
                                unsigned long min_channel_bytes,
-                               int (*Server_Channel_Ok)(unsigned long
+                               int (*server_channel_ok)(unsigned long
                                                          channelBytes),
-                               int (*Server_Channel_Init)
-                                (void *x, unsigned char *clientStr,
-                                 u32 clientStrLen, u64 bytes),
-                               ULTRA_VBUS_DEVICEINFO *chipset_DriverInfo)
+                               int (*server_channel_init)
+                                (void *x, unsigned char *client_str,
+                                 u32 client_str_len, u64 bytes),
+                               ULTRA_VBUS_DEVICEINFO *chipset_driver_info)
 {
-       ReqHandlerInfo_t *pReqHandlerInfo;
+       struct req_handler_info *pReqHandlerInfo;
        int rc = 0;             /* assume failure */
 
        LOGINF("type=%pUL, controlfunc=0x%p.\n",
-              &switchTypeGuid, controlfunc);
+              &switch_type_guid, controlfunc);
        if (!controlfunc) {
-               LOGERR("%pUL: controlfunc must be supplied\n", &switchTypeGuid);
+               LOGERR("%pUL: controlfunc must be supplied\n",
+                      &switch_type_guid);
                goto Away;
        }
-       if (!Server_Channel_Ok) {
+       if (!server_channel_ok) {
                LOGERR("%pUL: Server_Channel_Ok must be supplied\n",
-                               &switchTypeGuid);
+                               &switch_type_guid);
                goto Away;
        }
-       if (!Server_Channel_Init) {
+       if (!server_channel_init) {
                LOGERR("%pUL: Server_Channel_Init must be supplied\n",
-                               &switchTypeGuid);
+                               &switch_type_guid);
                goto Away;
        }
-       pReqHandlerInfo = ReqHandlerAdd(switchTypeGuid,
+       pReqHandlerInfo = req_handler_add(switch_type_guid,
                                        switch_type_name,
                                        controlfunc,
                                        min_channel_bytes,
-                                       Server_Channel_Ok, Server_Channel_Init);
+                                       server_channel_ok, server_channel_init);
        if (!pReqHandlerInfo) {
-               LOGERR("failed to add %pUL to server list\n", &switchTypeGuid);
+               LOGERR("failed to add %pUL to server list\n",
+                      &switch_type_guid);
                goto Away;
        }
 
-       atomic_inc(&UisUtils_Registered_Services);
+       atomic_inc(&uisutils_registered_services);
        rc = 1;                 /* success */
 Away:
        if (rc) {
-               if (chipset_DriverInfo)
-                       BusDeviceInfo_Init(chipset_DriverInfo, "chipset",
+               if (chipset_driver_info)
+                       BusDeviceInfo_Init(chipset_driver_info, "chipset",
                                           "uislib", VERSION, NULL);
        } else
-               LOGERR("failed to register type %pUL.\n", &switchTypeGuid);
+               LOGERR("failed to register type %pUL.\n", &switch_type_guid);
 
        return rc;
 }
 EXPORT_SYMBOL_GPL(uisctrl_register_req_handler_ex);
 
 int
-uisctrl_unregister_req_handler_ex(uuid_le switchTypeGuid)
+uisctrl_unregister_req_handler_ex(uuid_le switch_type_guid)
 {
        int rc = 0;             /* assume failure */
 
-       LOGINF("type=%pUL.\n", &switchTypeGuid);
-       if (ReqHandlerDel(switchTypeGuid) < 0) {
+       LOGINF("type=%pUL.\n", &switch_type_guid);
+       if (req_handler_del(switch_type_guid) < 0) {
                LOGERR("failed to remove %pUL from server list\n",
-                               &switchTypeGuid);
+                               &switch_type_guid);
                goto Away;
        }
-       atomic_dec(&UisUtils_Registered_Services);
+       atomic_dec(&uisutils_registered_services);
        rc = 1;                 /* success */
 Away:
        if (!rc)
-               LOGERR("failed to unregister type %pUL.\n", &switchTypeGuid);
+               LOGERR("failed to unregister type %pUL.\n", &switch_type_guid);
        return rc;
 }
 EXPORT_SYMBOL_GPL(uisctrl_unregister_req_handler_ex);
@@ -275,28 +277,28 @@ dolist: if (skb_shinfo(skb)->frag_list) {
 }
 EXPORT_SYMBOL_GPL(uisutil_copy_fragsinfo_from_skb);
 
-static LIST_HEAD(ReqHandlerInfo_list); /* list of ReqHandlerInfo_t */
+static LIST_HEAD(ReqHandlerInfo_list); /* list of struct req_handler_info */
 static DEFINE_SPINLOCK(ReqHandlerInfo_list_lock);
 
-ReqHandlerInfo_t *
-ReqHandlerAdd(uuid_le switchTypeGuid,
+struct req_handler_info *
+req_handler_add(uuid_le switch_type_guid,
              const char *switch_type_name,
              int (*controlfunc)(struct io_msgs *),
              unsigned long min_channel_bytes,
-             int (*Server_Channel_Ok)(unsigned long channelBytes),
-             int (*Server_Channel_Init)
-              (void *x, unsigned char *clientStr, u32 clientStrLen, u64 bytes))
+             int (*server_channel_ok)(unsigned long channel_bytes),
+             int (*server_channel_init)(void *x, unsigned char *client_str,
+                                        u32 client_str_len, u64 bytes))
 {
-       ReqHandlerInfo_t *rc = NULL;
+       struct req_handler_info *rc = NULL;
 
        rc = kzalloc(sizeof(*rc), GFP_ATOMIC);
        if (!rc)
                return NULL;
-       rc->switchTypeGuid = switchTypeGuid;
+       rc->switch_type_guid = switch_type_guid;
        rc->controlfunc = controlfunc;
        rc->min_channel_bytes = min_channel_bytes;
-       rc->Server_Channel_Ok = Server_Channel_Ok;
-       rc->Server_Channel_Init = Server_Channel_Init;
+       rc->server_channel_ok = server_channel_ok;
+       rc->server_channel_init = server_channel_init;
        if (switch_type_name)
                strncpy(rc->switch_type_name, switch_type_name,
                        sizeof(rc->switch_type_name) - 1);
@@ -307,16 +309,17 @@ ReqHandlerAdd(uuid_le switchTypeGuid,
        return rc;
 }
 
-ReqHandlerInfo_t *
-ReqHandlerFind(uuid_le switchTypeGuid)
+struct req_handler_info *
+req_handler_find(uuid_le switch_type_guid)
 {
        struct list_head *lelt, *tmp;
-       ReqHandlerInfo_t *entry = NULL;
+       struct req_handler_info *entry = NULL;
 
        spin_lock(&ReqHandlerInfo_list_lock);
        list_for_each_safe(lelt, tmp, &ReqHandlerInfo_list) {
-               entry = list_entry(lelt, ReqHandlerInfo_t, list_link);
-               if (uuid_le_cmp(entry->switchTypeGuid, switchTypeGuid) == 0) {
+               entry = list_entry(lelt, struct req_handler_info, list_link);
+               if (uuid_le_cmp(entry->switch_type_guid,
+                               switch_type_guid) == 0) {
                        spin_unlock(&ReqHandlerInfo_list_lock);
                        return entry;
                }
@@ -326,16 +329,17 @@ ReqHandlerFind(uuid_le switchTypeGuid)
 }
 
 int
-ReqHandlerDel(uuid_le switchTypeGuid)
+req_handler_del(uuid_le switch_type_guid)
 {
        struct list_head *lelt, *tmp;
-       ReqHandlerInfo_t *entry = NULL;
+       struct req_handler_info *entry = NULL;
        int rc = -1;
 
        spin_lock(&ReqHandlerInfo_list_lock);
        list_for_each_safe(lelt, tmp, &ReqHandlerInfo_list) {
-               entry = list_entry(lelt, ReqHandlerInfo_t, list_link);
-               if (uuid_le_cmp(entry->switchTypeGuid, switchTypeGuid) == 0) {
+               entry = list_entry(lelt, struct req_handler_info, list_link);
+               if (uuid_le_cmp(entry->switch_type_guid,
+                               switch_type_guid) == 0) {
                        list_del(lelt);
                        kfree(entry);
                        rc++;
diff --git a/drivers/staging/unisys/visorchipset/file.c 
b/drivers/staging/unisys/visorchipset/file.c
index 34c35dc..3321764 100644
--- a/drivers/staging/unisys/visorchipset/file.c
+++ b/drivers/staging/unisys/visorchipset/file.c
@@ -197,7 +197,7 @@ visorchipset_ioctl(struct inode *inode, struct file *file,
        switch (cmd) {
        case VMCALL_QUERY_GUEST_VIRTUAL_TIME_OFFSET:
                /* get the physical rtc offset */
-               vrtc_offset = Issue_VMCALL_QUERY_GUEST_VIRTUAL_TIME_OFFSET();
+               vrtc_offset = issue_vmcall_query_guest_virtual_time_offset();
                if (copy_to_user
                    ((void __user *)arg, &vrtc_offset, sizeof(vrtc_offset))) {
                        rc = -EFAULT;
@@ -214,7 +214,7 @@ visorchipset_ioctl(struct inode *inode, struct file *file,
                }
                DBGINF("insde visorchipset_ioctl, cmd=%d, adjustment=%lld", cmd,
                       adjustment);
-               rc = Issue_VMCALL_UPDATE_PHYSICAL_TIME(adjustment);
+               rc = issue_vmcall_update_physical_time(adjustment);
                break;
        default:
                LOGERR("visorchipset_ioctl received invalid command");
diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c 
b/drivers/staging/unisys/visorchipset/visorchipset_main.c
index 1eeeef8..1c3a8cd 100644
--- a/drivers/staging/unisys/visorchipset/visorchipset_main.c
+++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c
@@ -1911,7 +1911,7 @@ static HOSTADDRESS controlvm_get_channel_address(void)
        u64 addr = 0;
        u32 size = 0;
 
-       if (!VMCALL_SUCCESSFUL(Issue_VMCALL_IO_CONTROLVM_ADDR(&addr, &size))) {
+       if (!VMCALL_SUCCESSFUL(issue_vmcall_io_controlvm_addr(&addr, &size))) {
                ERRDRV("%s - vmcall to determine controlvm channel addr failed",
                       __func__);
                return 0;
-- 
1.9.1

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to