staging: unisys: fix CamelCase params in responder functions
[firefly-linux-kernel-4.4.55.git] / drivers / staging / unisys / visorchipset / visorchipset_main.c
index 284ed4f75f61db1fec5b70972e1c609532a788ec..700b35ed08cda30e2a8a7d24a9432fc1a1bb45e8 100644 (file)
@@ -49,7 +49,7 @@
 */
 #define MIN_IDLE_SECONDS 10
 static ulong poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST;
-static ulong Most_recent_message_jiffies;      /* when we got our last
+static ulong most_recent_message_jiffies;      /* when we got our last
                                                 * controlvm message */
 static inline char *
 NONULLSTR(char *s)
@@ -65,64 +65,60 @@ static int clientregistered;
 #define MAX_CHIPSET_EVENTS 2
 static u8 chipset_events[MAX_CHIPSET_EVENTS] = { 0, 0 };
 
-static struct delayed_work Periodic_controlvm_work;
-static struct workqueue_struct *Periodic_controlvm_workqueue;
-static DEFINE_SEMAPHORE(NotifierLock);
+static struct delayed_work periodic_controlvm_work;
+static struct workqueue_struct *periodic_controlvm_workqueue;
+static DEFINE_SEMAPHORE(notifier_lock);
 
-static struct controlvm_message_header g_DiagMsgHdr;
-static struct controlvm_message_header g_ChipSetMsgHdr;
-static struct controlvm_message_header g_DelDumpMsgHdr;
-static const uuid_le UltraDiagPoolChannelProtocolGuid =
+static struct controlvm_message_header g_diag_msg_hdr;
+static struct controlvm_message_header g_chipset_msg_hdr;
+static struct controlvm_message_header g_del_dump_msg_hdr;
+static const uuid_le spar_diag_pool_channel_protocol_uuid =
        SPAR_DIAG_POOL_CHANNEL_PROTOCOL_UUID;
 /* 0xffffff is an invalid Bus/Device number */
-static ulong g_diagpoolBusNo = 0xffffff;
-static ulong g_diagpoolDevNo = 0xffffff;
-static struct controlvm_message_packet g_DeviceChangeStatePacket;
+static ulong g_diagpool_bus_no = 0xffffff;
+static ulong g_diagpool_dev_no = 0xffffff;
+static struct controlvm_message_packet g_devicechangestate_packet;
 
 /* Only VNIC and VHBA channels are sent to visorclientbus (aka
  * "visorhackbus")
  */
 #define FOR_VISORHACKBUS(channel_type_guid) \
        (((uuid_le_cmp(channel_type_guid,\
-                      spar_vnic_channel_protocol_uuid) == 0)\
-       || (uuid_le_cmp(channel_type_guid,\
+                      spar_vnic_channel_protocol_uuid) == 0) ||\
+       (uuid_le_cmp(channel_type_guid,\
                        spar_vhba_channel_protocol_uuid) == 0)))
 #define FOR_VISORBUS(channel_type_guid) (!(FOR_VISORHACKBUS(channel_type_guid)))
 
 #define is_diagpool_channel(channel_type_guid) \
-        (uuid_le_cmp(channel_type_guid, UltraDiagPoolChannelProtocolGuid) == 0)
+       (uuid_le_cmp(channel_type_guid,\
+                    spar_diag_pool_channel_protocol_uuid) == 0)
 
-static LIST_HEAD(BusInfoList);
-static LIST_HEAD(DevInfoList);
+static LIST_HEAD(bus_info_list);
+static LIST_HEAD(dev_info_list);
 
-static struct visorchannel *ControlVm_channel;
+static struct visorchannel *controlvm_channel;
 
-struct controlvm_payload_info {
+/* Manages the request payload in the controlvm channel */
+static struct controlvm_payload_info {
        u8 __iomem *ptr;        /* pointer to base address of payload pool */
        u64 offset;             /* offset from beginning of controlvm
                                 * channel to beginning of payload * pool */
        u32 bytes;              /* number of bytes in payload pool */
-};
-
-/* Manages the request payload in the controlvm channel */
-static struct controlvm_payload_info ControlVm_payload_info;
-
-static struct channel_header *Test_Vnic_channel;
+} controlvm_payload_info;
 
-struct livedump_info {
-       struct controlvm_message_header Dumpcapture_header;
-       struct controlvm_message_header Gettextdump_header;
-       struct controlvm_message_header Dumpcomplete_header;
-       BOOL Gettextdump_outstanding;
+/* Manages the info for a CONTROLVM_DUMP_CAPTURESTATE /
+ * CONTROLVM_DUMP_GETTEXTDUMP / CONTROLVM_DUMP_COMPLETE conversation.
+ */
+static struct livedump_info {
+       struct controlvm_message_header dumpcapture_header;
+       struct controlvm_message_header gettextdump_header;
+       struct controlvm_message_header dumpcomplete_header;
+       BOOL gettextdump_outstanding;
        u32 crc32;
        ulong length;
        atomic_t buffers_in_use;
        ulong destination;
-};
-/* Manages the info for a CONTROLVM_DUMP_CAPTURESTATE /
- * CONTROLVM_DUMP_GETTEXTDUMP / CONTROLVM_DUMP_COMPLETE conversation.
- */
-static struct livedump_info LiveDump_info;
+} livedump_info;
 
 /* The following globals are used to handle the scenario where we are unable to
  * offload the payload from a controlvm message due to memory requirements.  In
@@ -352,7 +348,7 @@ static ssize_t toolaction_show(struct device *dev,
 {
        u8 toolAction;
 
-       visorchannel_read(ControlVm_channel,
+       visorchannel_read(controlvm_channel,
                offsetof(struct spar_controlvm_channel_protocol,
                           tool_action), &toolAction, sizeof(u8));
        return scnprintf(buf, PAGE_SIZE, "%u\n", toolAction);
@@ -368,7 +364,7 @@ static ssize_t toolaction_store(struct device *dev,
        if (kstrtou8(buf, 10, &toolAction) != 0)
                return -EINVAL;
 
-       ret = visorchannel_write(ControlVm_channel,
+       ret = visorchannel_write(controlvm_channel,
                offsetof(struct spar_controlvm_channel_protocol, tool_action),
                &toolAction, sizeof(u8));
 
@@ -383,7 +379,7 @@ static ssize_t boottotool_show(struct device *dev,
 {
        struct efi_spar_indication efiSparIndication;
 
-       visorchannel_read(ControlVm_channel,
+       visorchannel_read(controlvm_channel,
                offsetof(struct spar_controlvm_channel_protocol,
                        efi_spar_ind), &efiSparIndication,
                sizeof(struct efi_spar_indication));
@@ -402,7 +398,7 @@ static ssize_t boottotool_store(struct device *dev,
                return -EINVAL;
 
        efiSparIndication.boot_to_tool = val;
-       ret = visorchannel_write(ControlVm_channel,
+       ret = visorchannel_write(controlvm_channel,
                        offsetof(struct spar_controlvm_channel_protocol,
                                efi_spar_ind),
                        &(efiSparIndication),
@@ -418,7 +414,7 @@ static ssize_t error_show(struct device *dev, struct device_attribute *attr,
 {
        u32 error;
 
-       visorchannel_read(ControlVm_channel, offsetof(
+       visorchannel_read(controlvm_channel, offsetof(
                struct spar_controlvm_channel_protocol, installation_error),
                &error, sizeof(u32));
        return scnprintf(buf, PAGE_SIZE, "%i\n", error);
@@ -433,7 +429,7 @@ static ssize_t error_store(struct device *dev, struct device_attribute *attr,
        if (kstrtou32(buf, 10, &error) != 0)
                return -EINVAL;
 
-       ret = visorchannel_write(ControlVm_channel,
+       ret = visorchannel_write(controlvm_channel,
                        offsetof(struct spar_controlvm_channel_protocol,
                                installation_error),
                        &error, sizeof(u32));
@@ -447,7 +443,7 @@ static ssize_t textid_show(struct device *dev, struct device_attribute *attr,
 {
        u32 textId;
 
-       visorchannel_read(ControlVm_channel, offsetof(
+       visorchannel_read(controlvm_channel, offsetof(
                struct spar_controlvm_channel_protocol, installation_text_id),
                &textId, sizeof(u32));
        return scnprintf(buf, PAGE_SIZE, "%i\n", textId);
@@ -462,7 +458,7 @@ static ssize_t textid_store(struct device *dev, struct device_attribute *attr,
        if (kstrtou32(buf, 10, &textId) != 0)
                return -EINVAL;
 
-       ret = visorchannel_write(ControlVm_channel,
+       ret = visorchannel_write(controlvm_channel,
                        offsetof(struct spar_controlvm_channel_protocol,
                                installation_text_id),
                        &textId, sizeof(u32));
@@ -471,13 +467,12 @@ static ssize_t textid_store(struct device *dev, struct device_attribute *attr,
        return count;
 }
 
-
 static ssize_t remaining_steps_show(struct device *dev,
        struct device_attribute *attr, char *buf)
 {
        u16 remainingSteps;
 
-       visorchannel_read(ControlVm_channel,
+       visorchannel_read(controlvm_channel,
                offsetof(struct spar_controlvm_channel_protocol,
                        installation_remaining_steps),
                &remainingSteps,
@@ -494,7 +489,7 @@ static ssize_t remaining_steps_store(struct device *dev,
        if (kstrtou16(buf, 10, &remainingSteps) != 0)
                return -EINVAL;
 
-       ret = visorchannel_write(ControlVm_channel,
+       ret = visorchannel_write(controlvm_channel,
                        offsetof(struct spar_controlvm_channel_protocol,
                                installation_remaining_steps),
                        &remainingSteps, sizeof(u16));
@@ -503,44 +498,11 @@ static ssize_t remaining_steps_store(struct device *dev,
        return count;
 }
 
-#if 0
 static void
-testUnicode(void)
-{
-       wchar_t unicodeString[] = { 'a', 'b', 'c', 0 };
-       char s[sizeof(unicodeString) * NLS_MAX_CHARSET_SIZE];
-       wchar_t unicode2[99];
-
-       /* NOTE: Either due to a bug, or feature I don't understand, the
-        *       kernel utf8_mbstowcs() and utf_wcstombs() do NOT copy the
-        *       trailed NUL byte!!   REALLY!!!!!    Arrrrgggghhhhh
-        */
-
-       LOGINF("sizeof(wchar_t) = %d", sizeof(wchar_t));
-       LOGINF("utf8_wcstombs=%d",
-              chrs = utf8_wcstombs(s, unicodeString, sizeof(s)));
-       if (chrs >= 0)
-               s[chrs] = '\0'; /* GRRRRRRRR */
-       LOGINF("s='%s'", s);
-       LOGINF("utf8_mbstowcs=%d", chrs = utf8_mbstowcs(unicode2, s, 100));
-       if (chrs >= 0)
-               unicode2[chrs] = 0;     /* GRRRRRRRR */
-       if (memcmp(unicodeString, unicode2, sizeof(unicodeString)) == 0)
-               LOGINF("strings match... good");
-       else
-               LOGINF("strings did not match!!");
-}
-#endif
-
-static void
-busInfo_clear(void *v)
+bus_info_clear(void *v)
 {
        struct visorchipset_bus_info *p = (struct visorchipset_bus_info *) (v);
 
-       if (p->proc_object) {
-               visor_proc_DestroyObject(p->proc_object);
-               p->proc_object = NULL;
-       }
        kfree(p->name);
        p->name = NULL;
 
@@ -552,7 +514,7 @@ busInfo_clear(void *v)
 }
 
 static void
-devInfo_clear(void *v)
+dev_info_clear(void *v)
 {
        struct visorchipset_device_info *p =
                        (struct visorchipset_device_info *)(v);
@@ -587,8 +549,8 @@ visorchipset_register_busdev_server(
                        struct visorchipset_busdev_responders *responders,
                        struct ultra_vbus_deviceinfo *driver_info)
 {
-       down(&NotifierLock);
-       if (notifiers == NULL) {
+       down(&notifier_lock);
+       if (!notifiers) {
                memset(&BusDev_Server_Notifiers, 0,
                       sizeof(BusDev_Server_Notifiers));
                serverregistered = 0;   /* clear flag */
@@ -602,7 +564,7 @@ visorchipset_register_busdev_server(
                bus_device_info_init(driver_info, "chipset", "visorchipset",
                                   VERSION, NULL);
 
-       up(&NotifierLock);
+       up(&notifier_lock);
 }
 EXPORT_SYMBOL_GPL(visorchipset_register_busdev_server);
 
@@ -612,8 +574,8 @@ visorchipset_register_busdev_client(
                        struct visorchipset_busdev_responders *responders,
                        struct ultra_vbus_deviceinfo *driver_info)
 {
-       down(&NotifierLock);
-       if (notifiers == NULL) {
+       down(&notifier_lock);
+       if (!notifiers) {
                memset(&BusDev_Client_Notifiers, 0,
                       sizeof(BusDev_Client_Notifiers));
                clientregistered = 0;   /* clear flag */
@@ -626,7 +588,7 @@ visorchipset_register_busdev_client(
        if (driver_info)
                bus_device_info_init(driver_info, "chipset(bolts)",
                                     "visorchipset", VERSION, NULL);
-       up(&NotifierLock);
+       up(&notifier_lock);
 }
 EXPORT_SYMBOL_GPL(visorchipset_register_busdev_client);
 
@@ -636,14 +598,14 @@ cleanup_controlvm_structures(void)
        struct visorchipset_bus_info *bi, *tmp_bi;
        struct visorchipset_device_info *di, *tmp_di;
 
-       list_for_each_entry_safe(bi, tmp_bi, &BusInfoList, entry) {
-               busInfo_clear(bi);
+       list_for_each_entry_safe(bi, tmp_bi, &bus_info_list, entry) {
+               bus_info_clear(bi);
                list_del(&bi->entry);
                kfree(bi);
        }
 
-       list_for_each_entry_safe(di, tmp_di, &DevInfoList, entry) {
-               devInfo_clear(di);
+       list_for_each_entry_safe(di, tmp_di, &dev_info_list, entry) {
+               dev_info_clear(di);
                list_del(&di->entry);
                kfree(di);
        }
@@ -659,7 +621,7 @@ chipset_init(struct controlvm_message *inmsg)
        POSTCODE_LINUX_2(CHIPSET_INIT_ENTRY_PC, POSTCODE_SEVERITY_INFO);
        if (chipset_inited) {
                rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
-               goto Away;
+               goto cleanup;
        }
        chipset_inited = 1;
        POSTCODE_LINUX_2(CHIPSET_INIT_EXIT_PC, POSTCODE_SEVERITY_INFO);
@@ -674,7 +636,7 @@ chipset_init(struct controlvm_message *inmsg)
         * features-aware driver. */
        features |= ULTRA_CHIPSET_FEATURE_REPLY;
 
-Away:
+cleanup:
        if (rc < 0)
                cleanup_controlvm_structures();
        if (inmsg->hdr.flags.response_expected)
@@ -704,16 +666,16 @@ controlvm_respond(struct controlvm_message_header *msgHdr, int response)
        controlvm_init_response(&outmsg, msgHdr, response);
        /* For DiagPool channel DEVICE_CHANGESTATE, we need to send
        * back the deviceChangeState structure in the packet. */
-       if (msgHdr->id == CONTROLVM_DEVICE_CHANGESTATE
-           && g_DeviceChangeStatePacket.device_change_state.bus_no ==
-           g_diagpoolBusNo
-           && g_DeviceChangeStatePacket.device_change_state.dev_no ==
-           g_diagpoolDevNo)
-               outmsg.cmd = g_DeviceChangeStatePacket;
+       if (msgHdr->id == CONTROLVM_DEVICE_CHANGESTATE &&
+           g_devicechangestate_packet.device_change_state.bus_no ==
+           g_diagpool_bus_no &&
+           g_devicechangestate_packet.device_change_state.dev_no ==
+           g_diagpool_dev_no)
+               outmsg.cmd = g_devicechangestate_packet;
        if (outmsg.hdr.flags.test_message == 1)
                return;
 
-       if (!visorchannel_signalinsert(ControlVm_channel,
+       if (!visorchannel_signalinsert(controlvm_channel,
                                       CONTROLVM_QUEUE_REQUEST, &outmsg)) {
                return;
        }
@@ -728,7 +690,7 @@ controlvm_respond_chipset_init(struct controlvm_message_header *msgHdr,
 
        controlvm_init_response(&outmsg, msgHdr, response);
        outmsg.cmd.init_chipset.features = features;
-       if (!visorchannel_signalinsert(ControlVm_channel,
+       if (!visorchannel_signalinsert(controlvm_channel,
                                       CONTROLVM_QUEUE_REQUEST, &outmsg)) {
                return;
        }
@@ -743,7 +705,7 @@ static void controlvm_respond_physdev_changestate(
        controlvm_init_response(&outmsg, msgHdr, response);
        outmsg.cmd.device_change_state.state = state;
        outmsg.cmd.device_change_state.flags.phys_device = 1;
-       if (!visorchannel_signalinsert(ControlVm_channel,
+       if (!visorchannel_signalinsert(controlvm_channel,
                                       CONTROLVM_QUEUE_REQUEST, &outmsg)) {
                return;
        }
@@ -753,39 +715,39 @@ void
 visorchipset_save_message(struct controlvm_message *msg,
                          enum crash_obj_type type)
 {
-       u32 localSavedCrashMsgOffset;
-       u16 localSavedCrashMsgCount;
+       u32 crash_msg_offset;
+       u16 crash_msg_count;
 
        /* get saved message count */
-       if (visorchannel_read(ControlVm_channel,
+       if (visorchannel_read(controlvm_channel,
                              offsetof(struct spar_controlvm_channel_protocol,
                                       saved_crash_message_count),
-                             &localSavedCrashMsgCount, sizeof(u16)) < 0) {
+                             &crash_msg_count, sizeof(u16)) < 0) {
                POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
                                 POSTCODE_SEVERITY_ERR);
                return;
        }
 
-       if (localSavedCrashMsgCount != CONTROLVM_CRASHMSG_MAX) {
+       if (crash_msg_count != CONTROLVM_CRASHMSG_MAX) {
                POSTCODE_LINUX_3(CRASH_DEV_COUNT_FAILURE_PC,
-                                localSavedCrashMsgCount,
+                                crash_msg_count,
                                 POSTCODE_SEVERITY_ERR);
                return;
        }
 
        /* get saved crash message offset */
-       if (visorchannel_read(ControlVm_channel,
+       if (visorchannel_read(controlvm_channel,
                              offsetof(struct spar_controlvm_channel_protocol,
                                       saved_crash_message_offset),
-                             &localSavedCrashMsgOffset, sizeof(u32)) < 0) {
+                             &crash_msg_offset, sizeof(u32)) < 0) {
                POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
                                 POSTCODE_SEVERITY_ERR);
                return;
        }
 
        if (type == CRASH_BUS) {
-               if (visorchannel_write(ControlVm_channel,
-                                      localSavedCrashMsgOffset,
+               if (visorchannel_write(controlvm_channel,
+                                      crash_msg_offset,
                                       msg,
                                       sizeof(struct controlvm_message)) < 0) {
                        POSTCODE_LINUX_2(SAVE_MSG_BUS_FAILURE_PC,
@@ -793,8 +755,8 @@ visorchipset_save_message(struct controlvm_message *msg,
                        return;
                }
        } else {
-               if (visorchannel_write(ControlVm_channel,
-                                      localSavedCrashMsgOffset +
+               if (visorchannel_write(controlvm_channel,
+                                      crash_msg_offset +
                                       sizeof(struct controlvm_message), msg,
                                       sizeof(struct controlvm_message)) < 0) {
                        POSTCODE_LINUX_2(SAVE_MSG_DEV_FAILURE_PC,
@@ -806,62 +768,62 @@ visorchipset_save_message(struct controlvm_message *msg,
 EXPORT_SYMBOL_GPL(visorchipset_save_message);
 
 static void
-bus_responder(enum controlvm_id cmdId, ulong busNo, int response)
+bus_responder(enum controlvm_id cmd_id, ulong bus_no, int response)
 {
        struct visorchipset_bus_info *p = NULL;
        BOOL need_clear = FALSE;
 
-       p = findbus(&BusInfoList, busNo);
+       p = findbus(&bus_info_list, bus_no);
        if (!p)
                return;
 
        if (response < 0) {
-               if ((cmdId == CONTROLVM_BUS_CREATE) &&
+               if ((cmd_id == CONTROLVM_BUS_CREATE) &&
                    (response != (-CONTROLVM_RESP_ERROR_ALREADY_DONE)))
                        /* undo the row we just created... */
-                       delbusdevices(&DevInfoList, busNo);
+                       delbusdevices(&dev_info_list, bus_no);
        } else {
-               if (cmdId == CONTROLVM_BUS_CREATE)
+               if (cmd_id == CONTROLVM_BUS_CREATE)
                        p->state.created = 1;
-               if (cmdId == CONTROLVM_BUS_DESTROY)
+               if (cmd_id == CONTROLVM_BUS_DESTROY)
                        need_clear = TRUE;
        }
 
        if (p->pending_msg_hdr.id == CONTROLVM_INVALID)
                return;         /* no controlvm response needed */
-       if (p->pending_msg_hdr.id != (u32) cmdId)
+       if (p->pending_msg_hdr.id != (u32) cmd_id)
                return;
        controlvm_respond(&p->pending_msg_hdr, response);
        p->pending_msg_hdr.id = CONTROLVM_INVALID;
        if (need_clear) {
-               busInfo_clear(p);
-               delbusdevices(&DevInfoList, busNo);
+               bus_info_clear(p);
+               delbusdevices(&dev_info_list, bus_no);
        }
 }
 
 static void
-device_changestate_responder(enum controlvm_id cmdId,
-                            ulong busNo, ulong devNo, int response,
-                            struct spar_segment_state responseState)
+device_changestate_responder(enum controlvm_id cmd_id,
+                            ulong bus_no, ulong dev_no, int response,
+                            struct spar_segment_state response_state)
 {
        struct visorchipset_device_info *p = NULL;
        struct controlvm_message outmsg;
 
-       p = finddevice(&DevInfoList, busNo, devNo);
+       p = finddevice(&dev_info_list, bus_no, dev_no);
        if (!p)
                return;
        if (p->pending_msg_hdr.id == CONTROLVM_INVALID)
                return;         /* no controlvm response needed */
-       if (p->pending_msg_hdr.id != cmdId)
+       if (p->pending_msg_hdr.id != cmd_id)
                return;
 
        controlvm_init_response(&outmsg, &p->pending_msg_hdr, response);
 
-       outmsg.cmd.device_change_state.bus_no = busNo;
-       outmsg.cmd.device_change_state.dev_no = devNo;
-       outmsg.cmd.device_change_state.state = responseState;
+       outmsg.cmd.device_change_state.bus_no = bus_no;
+       outmsg.cmd.device_change_state.dev_no = dev_no;
+       outmsg.cmd.device_change_state.state = response_state;
 
-       if (!visorchannel_signalinsert(ControlVm_channel,
+       if (!visorchannel_signalinsert(controlvm_channel,
                                       CONTROLVM_QUEUE_REQUEST, &outmsg))
                return;
 
@@ -869,32 +831,32 @@ device_changestate_responder(enum controlvm_id cmdId,
 }
 
 static void
-device_responder(enum controlvm_id cmdId, ulong busNo, ulong devNo,
+device_responder(enum controlvm_id cmd_id, ulong bus_no, ulong dev_no,
                 int response)
 {
        struct visorchipset_device_info *p = NULL;
        BOOL need_clear = FALSE;
 
-       p = finddevice(&DevInfoList, busNo, devNo);
+       p = finddevice(&dev_info_list, bus_no, dev_no);
        if (!p)
                return;
        if (response >= 0) {
-               if (cmdId == CONTROLVM_DEVICE_CREATE)
+               if (cmd_id == CONTROLVM_DEVICE_CREATE)
                        p->state.created = 1;
-               if (cmdId == CONTROLVM_DEVICE_DESTROY)
+               if (cmd_id == CONTROLVM_DEVICE_DESTROY)
                        need_clear = TRUE;
        }
 
        if (p->pending_msg_hdr.id == CONTROLVM_INVALID)
                return;         /* no controlvm response needed */
 
-       if (p->pending_msg_hdr.id != (u32) cmdId)
+       if (p->pending_msg_hdr.id != (u32) cmd_id)
                return;
 
        controlvm_respond(&p->pending_msg_hdr, response);
        p->pending_msg_hdr.id = CONTROLVM_INVALID;
        if (need_clear)
-               devInfo_clear(p);
+               dev_info_clear(p);
 }
 
 static void
@@ -904,7 +866,7 @@ bus_epilog(u32 busNo,
 {
        BOOL notified = FALSE;
 
-       struct visorchipset_bus_info *pBusInfo = findbus(&BusInfoList, busNo);
+       struct visorchipset_bus_info *pBusInfo = findbus(&bus_info_list, busNo);
 
        if (!pBusInfo)
                return;
@@ -915,7 +877,7 @@ bus_epilog(u32 busNo,
        } else
                pBusInfo->pending_msg_hdr.id = CONTROLVM_INVALID;
 
-       down(&NotifierLock);
+       down(&notifier_lock);
        if (response == CONTROLVM_RESP_SUCCESS) {
                switch (cmd) {
                case CONTROLVM_BUS_CREATE:
@@ -960,7 +922,7 @@ bus_epilog(u32 busNo,
                ;
        else
                bus_responder(cmd, busNo, response);
-       up(&NotifierLock);
+       up(&notifier_lock);
 }
 
 static void
@@ -972,7 +934,7 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd,
        BOOL notified = FALSE;
 
        struct visorchipset_device_info *pDevInfo =
-               finddevice(&DevInfoList, busNo, devNo);
+               finddevice(&dev_info_list, busNo, devNo);
        char *envp[] = {
                "SPARSP_DIAGPOOL_PAUSED_STATE = 1",
                NULL
@@ -991,7 +953,7 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd,
        } else
                pDevInfo->pending_msg_hdr.id = CONTROLVM_INVALID;
 
-       down(&NotifierLock);
+       down(&notifier_lock);
        if (response >= 0) {
                switch (cmd) {
                case CONTROLVM_DEVICE_CREATE:
@@ -1029,8 +991,8 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd,
                                /* this is lite pause where channel is
                                 * still valid just 'pause' of it
                                 */
-                               if (busNo == g_diagpoolBusNo
-                                   && devNo == g_diagpoolDevNo) {
+                               if (busNo == g_diagpool_bus_no &&
+                                   devNo == g_diagpool_dev_no) {
                                        /* this will trigger the
                                         * diag_shutdown.sh script in
                                         * the visorchipset hotplug */
@@ -1056,7 +1018,7 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd,
                ;
        else
                device_responder(cmd, busNo, devNo, response);
-       up(&NotifierLock);
+       up(&notifier_lock);
 }
 
 static void
@@ -1068,7 +1030,7 @@ bus_create(struct controlvm_message *inmsg)
        struct visorchipset_bus_info *pBusInfo = NULL;
 
 
-       pBusInfo = findbus(&BusInfoList, busNo);
+       pBusInfo = findbus(&bus_info_list, busNo);
        if (pBusInfo && (pBusInfo->state.created == 1)) {
                POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, busNo,
                                 POSTCODE_SEVERITY_ERR);
@@ -1076,7 +1038,7 @@ bus_create(struct controlvm_message *inmsg)
                goto Away;
        }
        pBusInfo = kzalloc(sizeof(struct visorchipset_bus_info), GFP_KERNEL);
-       if (pBusInfo == NULL) {
+       if (!pBusInfo) {
                POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, busNo,
                                 POSTCODE_SEVERITY_ERR);
                rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
@@ -1101,7 +1063,7 @@ bus_create(struct controlvm_message *inmsg)
                        cmd->create_bus.bus_data_type_uuid;
        pBusInfo->chan_info.channel_inst_uuid = cmd->create_bus.bus_inst_uuid;
 
-       list_add(&pBusInfo->entry, &BusInfoList);
+       list_add(&pBusInfo->entry, &bus_info_list);
 
        POSTCODE_LINUX_3(BUS_CREATE_EXIT_PC, busNo, POSTCODE_SEVERITY_INFO);
 
@@ -1118,7 +1080,7 @@ bus_destroy(struct controlvm_message *inmsg)
        struct visorchipset_bus_info *pBusInfo;
        int rc = CONTROLVM_RESP_SUCCESS;
 
-       pBusInfo = findbus(&BusInfoList, busNo);
+       pBusInfo = findbus(&bus_info_list, busNo);
        if (!pBusInfo) {
                rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
                goto Away;
@@ -1146,7 +1108,7 @@ bus_configure(struct controlvm_message *inmsg,
        busNo = cmd->configure_bus.bus_no;
        POSTCODE_LINUX_3(BUS_CONFIGURE_ENTRY_PC, busNo, POSTCODE_SEVERITY_INFO);
 
-       pBusInfo = findbus(&BusInfoList, busNo);
+       pBusInfo = findbus(&bus_info_list, busNo);
        if (!pBusInfo) {
                POSTCODE_LINUX_3(BUS_CONFIGURE_FAILURE_PC, busNo,
                                 POSTCODE_SEVERITY_ERR);
@@ -1189,14 +1151,14 @@ my_device_create(struct controlvm_message *inmsg)
        struct visorchipset_bus_info *pBusInfo = NULL;
        int rc = CONTROLVM_RESP_SUCCESS;
 
-       pDevInfo = finddevice(&DevInfoList, busNo, devNo);
+       pDevInfo = finddevice(&dev_info_list, busNo, devNo);
        if (pDevInfo && (pDevInfo->state.created == 1)) {
                POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
                                 POSTCODE_SEVERITY_ERR);
                rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
                goto Away;
        }
-       pBusInfo = findbus(&BusInfoList, busNo);
+       pBusInfo = findbus(&bus_info_list, busNo);
        if (!pBusInfo) {
                POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
                                 POSTCODE_SEVERITY_ERR);
@@ -1210,7 +1172,7 @@ my_device_create(struct controlvm_message *inmsg)
                goto Away;
        }
        pDevInfo = kzalloc(sizeof(struct visorchipset_device_info), GFP_KERNEL);
-       if (pDevInfo == NULL) {
+       if (!pDevInfo) {
                POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
                                 POSTCODE_SEVERITY_ERR);
                rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
@@ -1233,15 +1195,15 @@ my_device_create(struct controlvm_message *inmsg)
        pDevInfo->chan_info.channel_type_uuid =
                        cmd->create_device.data_type_uuid;
        pDevInfo->chan_info.intr = cmd->create_device.intr;
-       list_add(&pDevInfo->entry, &DevInfoList);
+       list_add(&pDevInfo->entry, &dev_info_list);
        POSTCODE_LINUX_4(DEVICE_CREATE_EXIT_PC, devNo, busNo,
                         POSTCODE_SEVERITY_INFO);
 Away:
        /* get the bus and devNo for DiagPool channel */
        if (pDevInfo &&
            is_diagpool_channel(pDevInfo->chan_info.channel_type_uuid)) {
-               g_diagpoolBusNo = busNo;
-               g_diagpoolDevNo = devNo;
+               g_diagpool_bus_no = busNo;
+               g_diagpool_dev_no = devNo;
        }
        device_epilog(busNo, devNo, segment_state_running,
                      CONTROLVM_DEVICE_CREATE, &inmsg->hdr, rc,
@@ -1259,7 +1221,7 @@ my_device_changestate(struct controlvm_message *inmsg)
        struct visorchipset_device_info *pDevInfo = NULL;
        int rc = CONTROLVM_RESP_SUCCESS;
 
-       pDevInfo = finddevice(&DevInfoList, busNo, devNo);
+       pDevInfo = finddevice(&dev_info_list, busNo, devNo);
        if (!pDevInfo) {
                POSTCODE_LINUX_4(DEVICE_CHANGESTATE_FAILURE_PC, devNo, busNo,
                                 POSTCODE_SEVERITY_ERR);
@@ -1289,7 +1251,7 @@ my_device_destroy(struct controlvm_message *inmsg)
        struct visorchipset_device_info *pDevInfo = NULL;
        int rc = CONTROLVM_RESP_SUCCESS;
 
-       pDevInfo = finddevice(&DevInfoList, busNo, devNo);
+       pDevInfo = finddevice(&dev_info_list, busNo, devNo);
        if (!pDevInfo) {
                rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID;
                goto Away;
@@ -1320,7 +1282,7 @@ initialize_controlvm_payload_info(HOSTADDRESS phys_addr, u64 offset, u32 bytes,
        u8 __iomem *payload = NULL;
        int rc = CONTROLVM_RESP_SUCCESS;
 
-       if (info == NULL) {
+       if (!info) {
                rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID;
                goto Away;
        }
@@ -1330,7 +1292,7 @@ initialize_controlvm_payload_info(HOSTADDRESS phys_addr, u64 offset, u32 bytes,
                goto Away;
        }
        payload = ioremap_cache(phys_addr + offset, bytes);
-       if (payload == NULL) {
+       if (!payload) {
                rc = -CONTROLVM_RESP_ERROR_IOREMAP_FAILED;
                goto Away;
        }
@@ -1362,11 +1324,11 @@ destroy_controlvm_payload_info(struct controlvm_payload_info *info)
 static void
 initialize_controlvm_payload(void)
 {
-       HOSTADDRESS phys_addr = visorchannel_get_physaddr(ControlVm_channel);
+       HOSTADDRESS phys_addr = visorchannel_get_physaddr(controlvm_channel);
        u64 payloadOffset = 0;
        u32 payloadBytes = 0;
 
-       if (visorchannel_read(ControlVm_channel,
+       if (visorchannel_read(controlvm_channel,
                              offsetof(struct spar_controlvm_channel_protocol,
                                       request_payload_offset),
                              &payloadOffset, sizeof(payloadOffset)) < 0) {
@@ -1374,7 +1336,7 @@ initialize_controlvm_payload(void)
                                 POSTCODE_SEVERITY_ERR);
                return;
        }
-       if (visorchannel_read(ControlVm_channel,
+       if (visorchannel_read(controlvm_channel,
                              offsetof(struct spar_controlvm_channel_protocol,
                                       request_payload_bytes),
                              &payloadBytes, sizeof(payloadBytes)) < 0) {
@@ -1384,7 +1346,7 @@ initialize_controlvm_payload(void)
        }
        initialize_controlvm_payload_info(phys_addr,
                                          payloadOffset, payloadBytes,
-                                         &ControlVm_payload_info);
+                                         &controlvm_payload_info);
 }
 
 /*  Send ACTION=online for DEVPATH=/sys/devices/platform/visorchipset.
@@ -1435,7 +1397,7 @@ chipset_ready(struct controlvm_message_header *msgHdr)
                /* Send CHIPSET_READY response when all modules have been loaded
                 * and disks mounted for the partition
                 */
-               g_ChipSetMsgHdr = *msgHdr;
+               g_chipset_msg_hdr = *msgHdr;
        }
 }
 
@@ -1467,7 +1429,7 @@ chipset_notready(struct controlvm_message_header *msgHdr)
 static BOOL
 read_controlvm_event(struct controlvm_message *msg)
 {
-       if (visorchannel_signalremove(ControlVm_channel,
+       if (visorchannel_signalremove(controlvm_channel,
                                      CONTROLVM_QUEUE_EVENT, msg)) {
                /* got a message */
                if (msg->hdr.flags.test_message == 1)
@@ -1524,7 +1486,7 @@ parahotplug_request_create(struct controlvm_message *msg)
        struct parahotplug_request *req;
 
        req = kmalloc(sizeof(*req), GFP_KERNEL|__GFP_NORETRY);
-       if (req == NULL)
+       if (!req)
                return NULL;
 
        req->id = parahotplug_next_id();
@@ -1649,7 +1611,7 @@ parahotplug_process_message(struct controlvm_message *inmsg)
 
        req = parahotplug_request_create(inmsg);
 
-       if (req == NULL)
+       if (!req)
                return;
 
        if (inmsg->cmd.device_change_state.state.active) {
@@ -1717,7 +1679,7 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
                BOOL retry = FALSE;
 
                parser_ctx =
-                   parser_init_byteStream(parametersAddr, parametersBytes,
+                   parser_init_byte_stream(parametersAddr, parametersBytes,
                                           isLocalAddr, &retry);
                if (!parser_ctx && retry)
                        return FALSE;
@@ -1726,8 +1688,8 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
        if (!isLocalAddr) {
                controlvm_init_response(&ackmsg, &inmsg.hdr,
                                        CONTROLVM_RESP_SUCCESS);
-               if (ControlVm_channel)
-                       visorchannel_signalinsert(ControlVm_channel,
+               if (controlvm_channel)
+                       visorchannel_signalinsert(controlvm_channel,
                                                  CONTROLVM_QUEUE_ACK,
                                                  &ackmsg);
        }
@@ -1754,8 +1716,8 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
                        /* save the hdr and cmd structures for later use */
                        /* when sending back the response to Command */
                        my_device_changestate(&inmsg);
-                       g_DiagMsgHdr = inmsg.hdr;
-                       g_DeviceChangeStatePacket = inmsg.cmd;
+                       g_diag_msg_hdr = inmsg.hdr;
+                       g_devicechangestate_packet = inmsg.cmd;
                        break;
                }
                break;
@@ -1783,7 +1745,7 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
                break;
        }
 
-       if (parser_ctx != NULL) {
+       if (parser_ctx) {
                parser_done(parser_ctx);
                parser_ctx = NULL;
        }
@@ -1827,20 +1789,20 @@ controlvm_periodic_work(struct work_struct *work)
        /* Check events to determine if response to CHIPSET_READY
         * should be sent
         */
-       if (visorchipset_holdchipsetready
-           && (g_ChipSetMsgHdr.id != CONTROLVM_INVALID)) {
+       if (visorchipset_holdchipsetready &&
+           (g_chipset_msg_hdr.id != CONTROLVM_INVALID)) {
                if (check_chipset_events() == 1) {
-                       controlvm_respond(&g_ChipSetMsgHdr, 0);
+                       controlvm_respond(&g_chipset_msg_hdr, 0);
                        clear_chipset_events();
-                       memset(&g_ChipSetMsgHdr, 0,
+                       memset(&g_chipset_msg_hdr, 0,
                               sizeof(struct controlvm_message_header));
                }
        }
 
-       while (visorchannel_signalremove(ControlVm_channel,
+       while (visorchannel_signalremove(controlvm_channel,
                                         CONTROLVM_QUEUE_RESPONSE,
-                                        &inmsg)) {
-       }
+                                        &inmsg))
+               ;
        if (!gotACommand) {
                if (ControlVm_Pending_Msg_Valid) {
                        /* we throttled processing of a prior
@@ -1856,10 +1818,10 @@ controlvm_periodic_work(struct work_struct *work)
 
        handle_command_failed = FALSE;
        while (gotACommand && (!handle_command_failed)) {
-               Most_recent_message_jiffies = jiffies;
+               most_recent_message_jiffies = jiffies;
                if (handle_command(inmsg,
                                   visorchannel_get_physaddr
-                                  (ControlVm_channel)))
+                                  (controlvm_channel)))
                        gotACommand = read_controlvm_event(&inmsg);
                else {
                        /* this is a scenario where throttling
@@ -1880,7 +1842,7 @@ controlvm_periodic_work(struct work_struct *work)
 Away:
 
        if (time_after(jiffies,
-                      Most_recent_message_jiffies + (HZ * MIN_IDLE_SECONDS))) {
+                      most_recent_message_jiffies + (HZ * MIN_IDLE_SECONDS))) {
                /* it's been longer than MIN_IDLE_SECONDS since we
                * processed our last controlvm message; slow down the
                * polling
@@ -1892,14 +1854,13 @@ Away:
                        poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST;
        }
 
-       queue_delayed_work(Periodic_controlvm_workqueue,
-                          &Periodic_controlvm_work, poll_jiffies);
+       queue_delayed_work(periodic_controlvm_workqueue,
+                          &periodic_controlvm_work, poll_jiffies);
 }
 
 static void
 setup_crash_devices_work_queue(struct work_struct *work)
 {
-
        struct controlvm_message localCrashCreateBusMsg;
        struct controlvm_message localCrashCreateDevMsg;
        struct controlvm_message msg;
@@ -1926,7 +1887,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
        chipset_init(&msg);
 
        /* get saved message count */
-       if (visorchannel_read(ControlVm_channel,
+       if (visorchannel_read(controlvm_channel,
                              offsetof(struct spar_controlvm_channel_protocol,
                                       saved_crash_message_count),
                              &localSavedCrashMsgCount, sizeof(u16)) < 0) {
@@ -1943,7 +1904,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
        }
 
        /* get saved crash message offset */
-       if (visorchannel_read(ControlVm_channel,
+       if (visorchannel_read(controlvm_channel,
                              offsetof(struct spar_controlvm_channel_protocol,
                                       saved_crash_message_offset),
                              &localSavedCrashMsgOffset, sizeof(u32)) < 0) {
@@ -1953,7 +1914,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
        }
 
        /* read create device message for storage bus offset */
-       if (visorchannel_read(ControlVm_channel,
+       if (visorchannel_read(controlvm_channel,
                              localSavedCrashMsgOffset,
                              &localCrashCreateBusMsg,
                              sizeof(struct controlvm_message)) < 0) {
@@ -1963,7 +1924,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
        }
 
        /* read create device message for storage device */
-       if (visorchannel_read(ControlVm_channel,
+       if (visorchannel_read(controlvm_channel,
                              localSavedCrashMsgOffset +
                              sizeof(struct controlvm_message),
                              &localCrashCreateDevMsg,
@@ -1997,8 +1958,8 @@ Away:
 
        poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_SLOW;
 
-       queue_delayed_work(Periodic_controlvm_workqueue,
-                          &Periodic_controlvm_work, poll_jiffies);
+       queue_delayed_work(periodic_controlvm_workqueue,
+                          &periodic_controlvm_work, poll_jiffies);
 }
 
 static void
@@ -2028,7 +1989,6 @@ device_destroy_response(ulong busNo, ulong devNo, int response)
 void
 visorchipset_device_pause_response(ulong bus_no, ulong dev_no, int response)
 {
-
        device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE,
                                     bus_no, dev_no, response,
                                     segment_state_standby);
@@ -2046,7 +2006,7 @@ device_resume_response(ulong busNo, ulong devNo, int response)
 BOOL
 visorchipset_get_bus_info(ulong bus_no, struct visorchipset_bus_info *bus_info)
 {
-       void *p = findbus(&BusInfoList, bus_no);
+       void *p = findbus(&bus_info_list, bus_no);
 
        if (!p)
                return FALSE;
@@ -2058,7 +2018,7 @@ EXPORT_SYMBOL_GPL(visorchipset_get_bus_info);
 BOOL
 visorchipset_set_bus_context(ulong bus_no, void *context)
 {
-       struct visorchipset_bus_info *p = findbus(&BusInfoList, bus_no);
+       struct visorchipset_bus_info *p = findbus(&bus_info_list, bus_no);
 
        if (!p)
                return FALSE;
@@ -2071,7 +2031,7 @@ BOOL
 visorchipset_get_device_info(ulong bus_no, ulong dev_no,
                             struct visorchipset_device_info *dev_info)
 {
-       void *p = finddevice(&DevInfoList, bus_no, dev_no);
+       void *p = finddevice(&dev_info_list, bus_no, dev_no);
 
        if (!p)
                return FALSE;
@@ -2084,7 +2044,7 @@ BOOL
 visorchipset_set_device_context(ulong bus_no, ulong dev_no, void *context)
 {
        struct visorchipset_device_info *p =
-                       finddevice(&DevInfoList, bus_no, dev_no);
+                       finddevice(&dev_info_list, bus_no, dev_no);
 
        if (!p)
                return FALSE;
@@ -2195,9 +2155,9 @@ visorchipset_init(void)
 
        memset(&BusDev_Server_Notifiers, 0, sizeof(BusDev_Server_Notifiers));
        memset(&BusDev_Client_Notifiers, 0, sizeof(BusDev_Client_Notifiers));
-       memset(&ControlVm_payload_info, 0, sizeof(ControlVm_payload_info));
-       memset(&LiveDump_info, 0, sizeof(LiveDump_info));
-       atomic_set(&LiveDump_info.buffers_in_use, 0);
+       memset(&controlvm_payload_info, 0, sizeof(controlvm_payload_info));
+       memset(&livedump_info, 0, sizeof(livedump_info));
+       atomic_set(&livedump_info.buffers_in_use, 0);
 
        if (visorchipset_testvnic) {
                POSTCODE_LINUX_3(CHIPSET_INIT_FAILURE_PC, x, DIAG_SEVERITY_ERR);
@@ -2207,17 +2167,17 @@ visorchipset_init(void)
 
        addr = controlvm_get_channel_address();
        if (addr != 0) {
-               ControlVm_channel =
+               controlvm_channel =
                    visorchannel_create_with_lock
                    (addr,
                     sizeof(struct spar_controlvm_channel_protocol),
                     spar_controlvm_channel_protocol_uuid);
                if (SPAR_CONTROLVM_CHANNEL_OK_CLIENT(
-                               visorchannel_get_header(ControlVm_channel))) {
+                               visorchannel_get_header(controlvm_channel))) {
                        initialize_controlvm_payload();
                } else {
-                       visorchannel_destroy(ControlVm_channel);
-                       ControlVm_channel = NULL;
+                       visorchannel_destroy(controlvm_channel);
+                       controlvm_channel = NULL;
                        return -ENODEV;
                }
        } else {
@@ -2225,17 +2185,17 @@ visorchipset_init(void)
        }
 
        MajorDev = MKDEV(visorchipset_major, 0);
-       rc = visorchipset_file_init(MajorDev, &ControlVm_channel);
+       rc = visorchipset_file_init(MajorDev, &controlvm_channel);
        if (rc < 0) {
                POSTCODE_LINUX_2(CHIPSET_INIT_FAILURE_PC, DIAG_SEVERITY_ERR);
                goto Away;
        }
 
-       memset(&g_DiagMsgHdr, 0, sizeof(struct controlvm_message_header));
+       memset(&g_diag_msg_hdr, 0, sizeof(struct controlvm_message_header));
 
-       memset(&g_ChipSetMsgHdr, 0, sizeof(struct controlvm_message_header));
+       memset(&g_chipset_msg_hdr, 0, sizeof(struct controlvm_message_header));
 
-       memset(&g_DelDumpMsgHdr, 0, sizeof(struct controlvm_message_header));
+       memset(&g_del_dump_msg_hdr, 0, sizeof(struct controlvm_message_header));
 
        Putfile_buffer_list_pool =
            kmem_cache_create(Putfile_buffer_list_pool_name,
@@ -2249,30 +2209,29 @@ visorchipset_init(void)
        if (!visorchipset_disable_controlvm) {
                /* if booting in a crash kernel */
                if (visorchipset_crash_kernel)
-                       INIT_DELAYED_WORK(&Periodic_controlvm_work,
+                       INIT_DELAYED_WORK(&periodic_controlvm_work,
                                          setup_crash_devices_work_queue);
                else
-                       INIT_DELAYED_WORK(&Periodic_controlvm_work,
+                       INIT_DELAYED_WORK(&periodic_controlvm_work,
                                          controlvm_periodic_work);
-               Periodic_controlvm_workqueue =
+               periodic_controlvm_workqueue =
                    create_singlethread_workqueue("visorchipset_controlvm");
 
-               if (Periodic_controlvm_workqueue == NULL) {
+               if (!periodic_controlvm_workqueue) {
                        POSTCODE_LINUX_2(CREATE_WORKQUEUE_FAILED_PC,
                                         DIAG_SEVERITY_ERR);
                        rc = -ENOMEM;
                        goto Away;
                }
-               Most_recent_message_jiffies = jiffies;
+               most_recent_message_jiffies = jiffies;
                poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST;
-               rc = queue_delayed_work(Periodic_controlvm_workqueue,
-                                       &Periodic_controlvm_work, poll_jiffies);
+               rc = queue_delayed_work(periodic_controlvm_workqueue,
+                                       &periodic_controlvm_work, poll_jiffies);
                if (rc < 0) {
                        POSTCODE_LINUX_2(QUEUE_DELAYED_WORK_PC,
                                         DIAG_SEVERITY_ERR);
                        goto Away;
                }
-
        }
 
        Visorchipset_platform_device.dev.devt = MajorDev;
@@ -2299,13 +2258,12 @@ visorchipset_exit(void)
        if (visorchipset_disable_controlvm) {
                ;
        } else {
-               cancel_delayed_work(&Periodic_controlvm_work);
-               flush_workqueue(Periodic_controlvm_workqueue);
-               destroy_workqueue(Periodic_controlvm_workqueue);
-               Periodic_controlvm_workqueue = NULL;
-               destroy_controlvm_payload_info(&ControlVm_payload_info);
+               cancel_delayed_work(&periodic_controlvm_work);
+               flush_workqueue(periodic_controlvm_workqueue);
+               destroy_workqueue(periodic_controlvm_workqueue);
+               periodic_controlvm_workqueue = NULL;
+               destroy_controlvm_payload_info(&controlvm_payload_info);
        }
-       Test_Vnic_channel = NULL;
        if (Putfile_buffer_list_pool) {
                kmem_cache_destroy(Putfile_buffer_list_pool);
                Putfile_buffer_list_pool = NULL;
@@ -2313,13 +2271,13 @@ visorchipset_exit(void)
 
        cleanup_controlvm_structures();
 
-       memset(&g_DiagMsgHdr, 0, sizeof(struct controlvm_message_header));
+       memset(&g_diag_msg_hdr, 0, sizeof(struct controlvm_message_header));
 
-       memset(&g_ChipSetMsgHdr, 0, sizeof(struct controlvm_message_header));
+       memset(&g_chipset_msg_hdr, 0, sizeof(struct controlvm_message_header));
 
-       memset(&g_DelDumpMsgHdr, 0, sizeof(struct controlvm_message_header));
+       memset(&g_del_dump_msg_hdr, 0, sizeof(struct controlvm_message_header));
 
-       visorchannel_destroy(ControlVm_channel);
+       visorchannel_destroy(controlvm_channel);
 
        visorchipset_file_cleanup();
        POSTCODE_LINUX_2(DRIVER_EXIT_PC, POSTCODE_SEVERITY_INFO);