staging: unisys: fix CamelCase params in responder functions
[firefly-linux-kernel-4.4.55.git] / drivers / staging / unisys / visorchipset / visorchipset_main.c
index 05eea465f3de8e1c6165ee5ef7ed9337bf2740ce..700b35ed08cda30e2a8a7d24a9432fc1a1bb45e8 100644 (file)
@@ -22,7 +22,6 @@
 #include "periodic_work.h"
 #include "file.h"
 #include "parser.h"
-#include "uniklog.h"
 #include "uisutils.h"
 #include "controlvmcompletionstatus.h"
 #include "guestlinuxdebug.h"
@@ -49,8 +48,8 @@
 * message, we switch back to fast polling mode.
 */
 #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 poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST;
+static ulong most_recent_message_jiffies;      /* when we got our last
                                                 * controlvm message */
 static inline char *
 NONULLSTR(char *s)
@@ -66,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;
 
-typedef struct {
+/* 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 */
-} CONTROLVM_PAYLOAD_INFO;
-
-/* Manages the request payload in the controlvm channel */
-static CONTROLVM_PAYLOAD_INFO ControlVm_payload_info;
+} controlvm_payload_info;
 
-static struct channel_header *Test_Vnic_channel;
-
-typedef struct {
-       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;
-} LIVEDUMP_INFO;
-/* Manages the info for a CONTROLVM_DUMP_CAPTURESTATE /
- * CONTROLVM_DUMP_GETTEXTDUMP / CONTROLVM_DUMP_COMPLETE conversation.
- */
-static 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
@@ -145,7 +140,7 @@ static const char Putfile_buffer_list_pool_name[] =
  */
 struct putfile_buffer_entry {
        struct list_head next;  /* putfile_buffer_entry list */
-       PARSER_CONTEXT *parser_ctx; /* points to buffer containing input data */
+       struct parser_context *parser_ctx; /* points to input data buffer */
 };
 
 /* List of struct putfile_request *, via next_putfile_request member.
@@ -160,7 +155,7 @@ static LIST_HEAD(Putfile_request_list);
  */
 struct putfile_active_buffer {
        /* a payload from a controlvm message, containing a file data buffer */
-       PARSER_CONTEXT *parser_ctx;
+       struct parser_context *parser_ctx;
        /* points within data area of parser_ctx to next byte of data */
        u8 *pnext;
        /* # bytes left from <pnext> to the end of this data buffer */
@@ -353,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);
@@ -369,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));
 
@@ -384,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));
@@ -403,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),
@@ -419,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);
@@ -434,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));
@@ -448,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);
@@ -463,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));
@@ -472,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,
@@ -495,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));
@@ -504,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;
 
@@ -553,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);
@@ -588,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 */
@@ -603,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);
 
@@ -613,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 */
@@ -627,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);
 
@@ -637,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,9 +620,8 @@ chipset_init(struct controlvm_message *inmsg)
 
        POSTCODE_LINUX_2(CHIPSET_INIT_ENTRY_PC, POSTCODE_SEVERITY_INFO);
        if (chipset_inited) {
-               LOGERR("CONTROLVM_CHIPSET_INIT Failed: Already Done.");
                rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
-               goto Away;
+               goto cleanup;
        }
        chipset_inited = 1;
        POSTCODE_LINUX_2(CHIPSET_INIT_EXIT_PC, POSTCODE_SEVERITY_INFO);
@@ -676,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)
@@ -706,20 +666,17 @@ 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 (outmsg.hdr.flags.test_message == 1) {
-               LOGINF("%s controlvm_msg=0x%x response=%d for test message",
-                      __func__, outmsg.hdr.id, response);
+       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)) {
-               LOGERR("signalinsert failed!");
                return;
        }
 }
@@ -733,9 +690,8 @@ 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)) {
-               LOGERR("signalinsert failed!");
                return;
        }
 }
@@ -749,9 +705,8 @@ 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)) {
-               LOGERR("signalinsert failed!");
                return;
        }
 }
@@ -760,56 +715,50 @@ 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) {
-               LOGERR("failed to get Saved Message Count");
+                             &crash_msg_count, sizeof(u16)) < 0) {
                POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
                                 POSTCODE_SEVERITY_ERR);
                return;
        }
 
-       if (localSavedCrashMsgCount != CONTROLVM_CRASHMSG_MAX) {
-               LOGERR("Saved Message Count incorrect %d",
-                      localSavedCrashMsgCount);
+       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) {
-               LOGERR("failed to get Saved Message Offset");
+                             &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) {
-                       LOGERR("SAVE_MSG_BUS_FAILURE: Failed to write CrashCreateBusMsg!");
                        POSTCODE_LINUX_2(SAVE_MSG_BUS_FAILURE_PC,
                                         POSTCODE_SEVERITY_ERR);
                        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) {
-                       LOGERR("SAVE_MSG_DEV_FAILURE: Failed to write CrashCreateDevMsg!");
                        POSTCODE_LINUX_2(SAVE_MSG_DEV_FAILURE_PC,
                                         POSTCODE_SEVERITY_ERR);
                        return;
@@ -819,112 +768,95 @@ 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);
-       if (!p) {
-               LOGERR("internal error busNo=%lu", 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) {
-               LOGERR("bus_responder no pending msg");
+       if (p->pending_msg_hdr.id == CONTROLVM_INVALID)
                return;         /* no controlvm response needed */
-       }
-       if (p->pending_msg_hdr.id != (u32) cmdId) {
-               LOGERR("expected=%d, found=%d", cmdId, p->pending_msg_hdr.id);
+       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);
-       if (!p) {
-               LOGERR("internal error; busNo=%lu, devNo=%lu", busNo, devNo);
+       p = finddevice(&dev_info_list, bus_no, dev_no);
+       if (!p)
                return;
-       }
-       if (p->pending_msg_hdr.id == CONTROLVM_INVALID) {
-               LOGERR("device_responder no pending msg");
+       if (p->pending_msg_hdr.id == CONTROLVM_INVALID)
                return;         /* no controlvm response needed */
-       }
-       if (p->pending_msg_hdr.id != cmdId) {
-               LOGERR("expected=%d, found=%d", cmdId, p->pending_msg_hdr.id);
+       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,
-                                      CONTROLVM_QUEUE_REQUEST, &outmsg)) {
-               LOGERR("signalinsert failed!");
+       if (!visorchannel_signalinsert(controlvm_channel,
+                                      CONTROLVM_QUEUE_REQUEST, &outmsg))
                return;
-       }
 
        p->pending_msg_hdr.id = CONTROLVM_INVALID;
 }
 
 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);
-       if (!p) {
-               LOGERR("internal error; busNo=%lu, devNo=%lu", 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) {
-               LOGERR("device_responder no pending msg");
+       if (p->pending_msg_hdr.id == CONTROLVM_INVALID)
                return;         /* no controlvm response needed */
-       }
-       if (p->pending_msg_hdr.id != (u32) cmdId) {
-               LOGERR("expected=%d, found=%d", cmdId, p->pending_msg_hdr.id);
+
+       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
@@ -934,19 +866,18 @@ 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) {
-               LOGERR("HUH? bad busNo=%d", busNo);
+       if (!pBusInfo)
                return;
-       }
+
        if (needResponse) {
                memcpy(&pBusInfo->pending_msg_hdr, msgHdr,
                       sizeof(struct controlvm_message_header));
        } else
                pBusInfo->pending_msg_hdr.id = CONTROLVM_INVALID;
 
-       down(&NotifierLock);
+       down(&notifier_lock);
        if (response == CONTROLVM_RESP_SUCCESS) {
                switch (cmd) {
                case CONTROLVM_BUS_CREATE:
@@ -991,7 +922,7 @@ bus_epilog(u32 busNo,
                ;
        else
                bus_responder(cmd, busNo, response);
-       up(&NotifierLock);
+       up(&notifier_lock);
 }
 
 static void
@@ -1003,16 +934,15 @@ 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
        };
 
-       if (!pDevInfo) {
-               LOGERR("HUH? bad busNo=%d, devNo=%d", busNo, devNo);
+       if (!pDevInfo)
                return;
-       }
+
        if (for_visorbus)
                notifiers = &BusDev_Server_Notifiers;
        else
@@ -1023,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:
@@ -1061,10 +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) {
-                                       LOGINF("DEVICE_CHANGESTATE(DiagpoolChannel busNo=%d devNo=%d is pausing...)",
-                                            busNo, devNo);
+                               if (busNo == g_diagpool_bus_no &&
+                                   devNo == g_diagpool_dev_no) {
                                        /* this will trigger the
                                         * diag_shutdown.sh script in
                                         * the visorchipset hotplug */
@@ -1090,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
@@ -1102,19 +1030,15 @@ 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)) {
-               LOGERR("CONTROLVM_BUS_CREATE Failed: bus %lu already exists",
-                      busNo);
                POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, busNo,
                                 POSTCODE_SEVERITY_ERR);
                rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
                goto Away;
        }
        pBusInfo = kzalloc(sizeof(struct visorchipset_bus_info), GFP_KERNEL);
-       if (pBusInfo == NULL) {
-               LOGERR("CONTROLVM_BUS_CREATE Failed: bus %lu kzalloc failed",
-                      busNo);
+       if (!pBusInfo) {
                POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, busNo,
                                 POSTCODE_SEVERITY_ERR);
                rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
@@ -1139,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);
 
@@ -1156,15 +1080,12 @@ 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) {
-               LOGERR("CONTROLVM_BUS_DESTROY Failed: bus %lu invalid", busNo);
                rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
                goto Away;
        }
        if (pBusInfo->state.created == 0) {
-               LOGERR("CONTROLVM_BUS_DESTROY Failed: bus %lu already destroyed",
-                    busNo);
                rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
                goto Away;
        }
@@ -1175,7 +1096,8 @@ Away:
 }
 
 static void
-bus_configure(struct controlvm_message *inmsg, PARSER_CONTEXT *parser_ctx)
+bus_configure(struct controlvm_message *inmsg,
+             struct parser_context *parser_ctx)
 {
        struct controlvm_message_packet *cmd = &inmsg->cmd;
        ulong busNo = cmd->configure_bus.bus_no;
@@ -1186,18 +1108,14 @@ bus_configure(struct controlvm_message *inmsg, PARSER_CONTEXT *parser_ctx)
        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) {
-               LOGERR("CONTROLVM_BUS_CONFIGURE Failed: bus %lu invalid",
-                      busNo);
                POSTCODE_LINUX_3(BUS_CONFIGURE_FAILURE_PC, busNo,
                                 POSTCODE_SEVERITY_ERR);
                rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
                goto Away;
        }
        if (pBusInfo->state.created == 0) {
-               LOGERR("CONTROLVM_BUS_CONFIGURE Failed: Invalid bus %lu - not created yet",
-                    busNo);
                POSTCODE_LINUX_3(BUS_CONFIGURE_FAILURE_PC, busNo,
                                 POSTCODE_SEVERITY_ERR);
                rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
@@ -1205,8 +1123,6 @@ bus_configure(struct controlvm_message *inmsg, PARSER_CONTEXT *parser_ctx)
        }
        /* TBD - add this check to other commands also... */
        if (pBusInfo->pending_msg_hdr.id != CONTROLVM_INVALID) {
-               LOGERR("CONTROLVM_BUS_CONFIGURE Failed: bus %lu MsgId=%u outstanding",
-                    busNo, (uint) pBusInfo->pending_msg_hdr.id);
                POSTCODE_LINUX_3(BUS_CONFIGURE_FAILURE_PC, busNo,
                                 POSTCODE_SEVERITY_ERR);
                rc = -CONTROLVM_RESP_ERROR_MESSAGE_ID_INVALID_FOR_CLIENT;
@@ -1235,36 +1151,28 @@ 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)) {
-               LOGERR("CONTROLVM_DEVICE_CREATE Failed: busNo=%lu, devNo=%lu already exists",
-                    busNo, devNo);
                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) {
-               LOGERR("CONTROLVM_DEVICE_CREATE Failed: Invalid bus %lu - out of range",
-                    busNo);
                POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
                                 POSTCODE_SEVERITY_ERR);
                rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
                goto Away;
        }
        if (pBusInfo->state.created == 0) {
-               LOGERR("CONTROLVM_DEVICE_CREATE Failed: Invalid bus %lu - not created yet",
-                    busNo);
                POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
                                 POSTCODE_SEVERITY_ERR);
                rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
                goto Away;
        }
        pDevInfo = kzalloc(sizeof(struct visorchipset_device_info), GFP_KERNEL);
-       if (pDevInfo == NULL) {
-               LOGERR("CONTROLVM_DEVICE_CREATE Failed: busNo=%lu, devNo=%lu kmaloc failed",
-                    busNo, devNo);
+       if (!pDevInfo) {
                POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
                                 POSTCODE_SEVERITY_ERR);
                rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
@@ -1287,17 +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;
-               LOGINF("CONTROLVM_DEVICE_CREATE for DiagPool channel: busNo=%lu, devNo=%lu",
-                    g_diagpoolBusNo, g_diagpoolDevNo);
+               g_diagpool_bus_no = busNo;
+               g_diagpool_dev_no = devNo;
        }
        device_epilog(busNo, devNo, segment_state_running,
                      CONTROLVM_DEVICE_CREATE, &inmsg->hdr, rc,
@@ -1315,18 +1221,14 @@ 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) {
-               LOGERR("CONTROLVM_DEVICE_CHANGESTATE Failed: busNo=%lu, devNo=%lu invalid (doesn't exist)",
-                    busNo, devNo);
                POSTCODE_LINUX_4(DEVICE_CHANGESTATE_FAILURE_PC, devNo, busNo,
                                 POSTCODE_SEVERITY_ERR);
                rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID;
                goto Away;
        }
        if (pDevInfo->state.created == 0) {
-               LOGERR("CONTROLVM_DEVICE_CHANGESTATE Failed: busNo=%lu, devNo=%lu invalid (not created)",
-                    busNo, devNo);
                POSTCODE_LINUX_4(DEVICE_CHANGESTATE_FAILURE_PC, devNo, busNo,
                                 POSTCODE_SEVERITY_ERR);
                rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID;
@@ -1349,16 +1251,12 @@ 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) {
-               LOGERR("CONTROLVM_DEVICE_DESTROY Failed: busNo=%lu, devNo=%lu invalid",
-                    busNo, devNo);
                rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID;
                goto Away;
        }
        if (pDevInfo->state.created == 0) {
-               LOGERR("CONTROLVM_DEVICE_DESTROY Failed: busNo=%lu, devNo=%lu already destroyed",
-                    busNo, devNo);
                rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
        }
 
@@ -1374,33 +1272,27 @@ Away:
 /* When provided with the physical address of the controlvm channel
  * (phys_addr), the offset to the payload area we need to manage
  * (offset), and the size of this payload area (bytes), fills in the
- * CONTROLVM_PAYLOAD_INFO struct.  Returns TRUE for success or FALSE
+ * controlvm_payload_info struct.  Returns TRUE for success or FALSE
  * for failure.
  */
 static int
 initialize_controlvm_payload_info(HOSTADDRESS phys_addr, u64 offset, u32 bytes,
-                                 CONTROLVM_PAYLOAD_INFO *info)
+                                 struct controlvm_payload_info *info)
 {
        u8 __iomem *payload = NULL;
        int rc = CONTROLVM_RESP_SUCCESS;
 
-       if (info == NULL) {
-               LOGERR("HUH ? CONTROLVM_PAYLOAD_INIT Failed : Programmer check at %s:%d",
-                    __FILE__, __LINE__);
+       if (!info) {
                rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID;
                goto Away;
        }
-       memset(info, 0, sizeof(CONTROLVM_PAYLOAD_INFO));
+       memset(info, 0, sizeof(struct controlvm_payload_info));
        if ((offset == 0) || (bytes == 0)) {
-               LOGERR("CONTROLVM_PAYLOAD_INIT Failed: request_payload_offset=%llu request_payload_bytes=%llu!",
-                    (u64) offset, (u64) bytes);
                rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID;
                goto Away;
        }
        payload = ioremap_cache(phys_addr + offset, bytes);
-       if (payload == NULL) {
-               LOGERR("CONTROLVM_PAYLOAD_INIT Failed: ioremap_cache %llu for %llu bytes failed",
-                    (u64) offset, (u64) bytes);
+       if (!payload) {
                rc = -CONTROLVM_RESP_ERROR_IOREMAP_FAILED;
                goto Away;
        }
@@ -1408,8 +1300,6 @@ initialize_controlvm_payload_info(HOSTADDRESS phys_addr, u64 offset, u32 bytes,
        info->offset = offset;
        info->bytes = bytes;
        info->ptr = payload;
-       LOGINF("offset=%llu, bytes=%lu, ptr=%p",
-              (u64) (info->offset), (ulong) (info->bytes), info->ptr);
 
 Away:
        if (rc < 0) {
@@ -1422,43 +1312,41 @@ Away:
 }
 
 static void
-destroy_controlvm_payload_info(CONTROLVM_PAYLOAD_INFO *info)
+destroy_controlvm_payload_info(struct controlvm_payload_info *info)
 {
        if (info->ptr != NULL) {
                iounmap(info->ptr);
                info->ptr = NULL;
        }
-       memset(info, 0, sizeof(CONTROLVM_PAYLOAD_INFO));
+       memset(info, 0, sizeof(struct controlvm_payload_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) {
-               LOGERR("CONTROLVM_PAYLOAD_INIT Failed to read controlvm channel!");
                POSTCODE_LINUX_2(CONTROLVM_INIT_FAILURE_PC,
                                 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) {
-               LOGERR("CONTROLVM_PAYLOAD_INIT Failed to read controlvm channel!");
                POSTCODE_LINUX_2(CONTROLVM_INIT_FAILURE_PC,
                                 POSTCODE_SEVERITY_ERR);
                return;
        }
        initialize_controlvm_payload_info(phys_addr,
                                          payloadOffset, payloadBytes,
-                                         &ControlVm_payload_info);
+                                         &controlvm_payload_info);
 }
 
 /*  Send ACTION=online for DEVPATH=/sys/devices/platform/visorchipset.
@@ -1509,8 +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;
-               LOGINF("Holding CHIPSET_READY response");
+               g_chipset_msg_hdr = *msgHdr;
        }
 }
 
@@ -1542,14 +1429,11 @@ 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) {
-                       LOGERR("ignoring bad CONTROLVM_QUEUE_EVENT msg with controlvm_msg_id=0x%x because Flags.testMessage is nonsensical (=1)",
-                              msg->hdr.id);
+               if (msg->hdr.flags.test_message == 1)
                        return FALSE;
-               }
                return TRUE;
        }
        return FALSE;
@@ -1602,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();
@@ -1647,12 +1531,6 @@ parahotplug_request_kickoff(struct parahotplug_request *req)
        sprintf(env_func, "SPAR_PARAHOTPLUG_FUNCTION=%d",
                cmd->device_change_state.dev_no & 0x7);
 
-       LOGINF("parahotplug_request_kickoff: state=%d, bdf=%d/%d/%d, id=%u\n",
-              cmd->device_change_state.state.active,
-              cmd->device_change_state.bus_no,
-              cmd->device_change_state.dev_no >> 3,
-              cmd->device_change_state.dev_no & 7, req->id);
-
        kobject_uevent_env(&Visorchipset_platform_device.dev.kobj, KOBJ_CHANGE,
                           envp);
 }
@@ -1733,10 +1611,8 @@ parahotplug_process_message(struct controlvm_message *inmsg)
 
        req = parahotplug_request_create(inmsg);
 
-       if (req == NULL) {
-               LOGERR("parahotplug_process_message: couldn't allocate request");
+       if (!req)
                return;
-       }
 
        if (inmsg->cmd.device_change_state.state.active) {
                /* For enable messages, just respond with success
@@ -1784,16 +1660,14 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
        struct controlvm_message_packet *cmd = &inmsg.cmd;
        u64 parametersAddr = 0;
        u32 parametersBytes = 0;
-       PARSER_CONTEXT *parser_ctx = NULL;
+       struct parser_context *parser_ctx = NULL;
        BOOL isLocalAddr = FALSE;
        struct controlvm_message ackmsg;
 
        /* create parsing context if necessary */
        isLocalAddr = (inmsg.hdr.flags.test_message == 1);
-       if (channel_addr == 0) {
-               LOGERR("HUH? channel_addr is 0!");
+       if (channel_addr == 0)
                return TRUE;
-       }
        parametersAddr = channel_addr + inmsg.hdr.payload_vm_offset;
        parametersBytes = inmsg.hdr.payload_bytes;
 
@@ -1805,112 +1679,73 @@ 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) {
-                       if (retry) {
-                               LOGWRN("throttling to copy payload");
-                               return FALSE;
-                       }
-                       LOGWRN("parsing failed");
-                       LOGWRN("inmsg.hdr.Id=0x%lx", (ulong) inmsg.hdr.id);
-                       LOGWRN("parametersAddr=0x%llx", (u64) parametersAddr);
-                       LOGWRN("parametersBytes=%lu", (ulong) parametersBytes);
-                       LOGWRN("isLocalAddr=%d", isLocalAddr);
-               }
+               if (!parser_ctx && retry)
+                       return FALSE;
        }
 
        if (!isLocalAddr) {
                controlvm_init_response(&ackmsg, &inmsg.hdr,
                                        CONTROLVM_RESP_SUCCESS);
-               if ((ControlVm_channel)
-                   &&
-                   (!visorchannel_signalinsert
-                    (ControlVm_channel, CONTROLVM_QUEUE_ACK, &ackmsg)))
-                       LOGWRN("failed to send ACK failed");
+               if (controlvm_channel)
+                       visorchannel_signalinsert(controlvm_channel,
+                                                 CONTROLVM_QUEUE_ACK,
+                                                 &ackmsg);
        }
        switch (inmsg.hdr.id) {
        case CONTROLVM_CHIPSET_INIT:
-               LOGINF("CHIPSET_INIT(#busses=%lu,#switches=%lu)",
-                      (ulong) inmsg.cmd.init_chipset.bus_count,
-                      (ulong) inmsg.cmd.init_chipset.switch_count);
                chipset_init(&inmsg);
                break;
        case CONTROLVM_BUS_CREATE:
-               LOGINF("BUS_CREATE(%lu,#devs=%lu)",
-                      (ulong) cmd->create_bus.bus_no,
-                      (ulong) cmd->create_bus.dev_count);
                bus_create(&inmsg);
                break;
        case CONTROLVM_BUS_DESTROY:
-               LOGINF("BUS_DESTROY(%lu)", (ulong) cmd->destroy_bus.bus_no);
                bus_destroy(&inmsg);
                break;
        case CONTROLVM_BUS_CONFIGURE:
-               LOGINF("BUS_CONFIGURE(%lu)", (ulong) cmd->configure_bus.bus_no);
                bus_configure(&inmsg, parser_ctx);
                break;
        case CONTROLVM_DEVICE_CREATE:
-               LOGINF("DEVICE_CREATE(%lu,%lu)",
-                      (ulong) cmd->create_device.bus_no,
-                      (ulong) cmd->create_device.dev_no);
                my_device_create(&inmsg);
                break;
        case CONTROLVM_DEVICE_CHANGESTATE:
                if (cmd->device_change_state.flags.phys_device) {
-                       LOGINF("DEVICE_CHANGESTATE for physical device (%lu,%lu, active=%lu)",
-                            (ulong) cmd->device_change_state.bus_no,
-                            (ulong) cmd->device_change_state.dev_no,
-                            (ulong) cmd->device_change_state.state.active);
                        parahotplug_process_message(&inmsg);
                } else {
-                       LOGINF("DEVICE_CHANGESTATE for virtual device (%lu,%lu, state.Alive=0x%lx)",
-                            (ulong) cmd->device_change_state.bus_no,
-                            (ulong) cmd->device_change_state.dev_no,
-                            (ulong) cmd->device_change_state.state.alive);
                        /* 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;
        case CONTROLVM_DEVICE_DESTROY:
-               LOGINF("DEVICE_DESTROY(%lu,%lu)",
-                      (ulong) cmd->destroy_device.bus_no,
-                      (ulong) cmd->destroy_device.dev_no);
                my_device_destroy(&inmsg);
                break;
        case CONTROLVM_DEVICE_CONFIGURE:
-               LOGINF("DEVICE_CONFIGURE(%lu,%lu)",
-                      (ulong) cmd->configure_device.bus_no,
-                      (ulong) cmd->configure_device.dev_no);
                /* no op for now, just send a respond that we passed */
                if (inmsg.hdr.flags.response_expected)
                        controlvm_respond(&inmsg.hdr, CONTROLVM_RESP_SUCCESS);
                break;
        case CONTROLVM_CHIPSET_READY:
-               LOGINF("CHIPSET_READY");
                chipset_ready(&inmsg.hdr);
                break;
        case CONTROLVM_CHIPSET_SELFTEST:
-               LOGINF("CHIPSET_SELFTEST");
                chipset_selftest(&inmsg.hdr);
                break;
        case CONTROLVM_CHIPSET_STOP:
-               LOGINF("CHIPSET_STOP");
                chipset_notready(&inmsg.hdr);
                break;
        default:
-               LOGERR("unrecognized controlvm cmd=%d", (int) inmsg.hdr.id);
                if (inmsg.hdr.flags.response_expected)
                        controlvm_respond(&inmsg.hdr,
                                          -CONTROLVM_RESP_ERROR_MESSAGE_ID_UNKNOWN);
                break;
        }
 
-       if (parser_ctx != NULL) {
+       if (parser_ctx) {
                parser_done(parser_ctx);
                parser_ctx = NULL;
        }
@@ -1922,12 +1757,9 @@ static HOSTADDRESS controlvm_get_channel_address(void)
        u64 addr = 0;
        u32 size = 0;
 
-       if (!VMCALL_SUCCESSFUL(issue_vmcall_io_controlvm_addr(&addr, &size))) {
-               ERRDRV("%s - vmcall to determine controlvm channel addr failed",
-                      __func__);
+       if (!VMCALL_SUCCESSFUL(issue_vmcall_io_controlvm_addr(&addr, &size)))
                return 0;
-       }
-       INFODRV("controlvm addr=%Lx", addr);
+
        return addr;
 }
 
@@ -1957,27 +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) {
-                       LOGINF("Sending CHIPSET_READY response");
-                       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)) {
-               if (inmsg.hdr.payload_max_bytes != 0) {
-                       LOGERR("Payload of size %lu returned @%lu with unexpected message id %d.",
-                            (ulong) inmsg.hdr.payload_max_bytes,
-                            (ulong) inmsg.hdr.payload_vm_offset,
-                            inmsg.hdr.id);
-               }
-       }
+                                        &inmsg))
+               ;
        if (!gotACommand) {
                if (ControlVm_Pending_Msg_Valid) {
                        /* we throttled processing of a prior
@@ -1993,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
@@ -2017,30 +1842,25 @@ 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
                */
-               if (Poll_jiffies != POLLJIFFIES_CONTROLVMCHANNEL_SLOW) {
-                       LOGINF("switched to slow controlvm polling");
-                       Poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_SLOW;
-               }
+               if (poll_jiffies != POLLJIFFIES_CONTROLVMCHANNEL_SLOW)
+                       poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_SLOW;
        } else {
-               if (Poll_jiffies != POLLJIFFIES_CONTROLVMCHANNEL_FAST) {
-                       Poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST;
-                       LOGINF("switched to fast controlvm polling");
-               }
+               if (poll_jiffies != POLLJIFFIES_CONTROLVMCHANNEL_FAST)
+                       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;
@@ -2067,19 +1887,16 @@ 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) {
-               LOGERR("failed to get Saved Message Count");
                POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
                                 POSTCODE_SEVERITY_ERR);
                return;
        }
 
        if (localSavedCrashMsgCount != CONTROLVM_CRASHMSG_MAX) {
-               LOGERR("Saved Message Count incorrect %d",
-                      localSavedCrashMsgCount);
                POSTCODE_LINUX_3(CRASH_DEV_COUNT_FAILURE_PC,
                                 localSavedCrashMsgCount,
                                 POSTCODE_SEVERITY_ERR);
@@ -2087,34 +1904,31 @@ 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) {
-               LOGERR("failed to get Saved Message Offset");
                POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
                                 POSTCODE_SEVERITY_ERR);
                return;
        }
 
        /* 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) {
-               LOGERR("CRASH_DEV_RD_BUS_FAIULRE: Failed to read CrashCreateBusMsg!");
                POSTCODE_LINUX_2(CRASH_DEV_RD_BUS_FAIULRE_PC,
                                 POSTCODE_SEVERITY_ERR);
                return;
        }
 
        /* read create device message for storage device */
-       if (visorchannel_read(ControlVm_channel,
+       if (visorchannel_read(controlvm_channel,
                              localSavedCrashMsgOffset +
                              sizeof(struct controlvm_message),
                              &localCrashCreateDevMsg,
                              sizeof(struct controlvm_message)) < 0) {
-               LOGERR("CRASH_DEV_RD_DEV_FAIULRE: Failed to read CrashCreateDevMsg!");
                POSTCODE_LINUX_2(CRASH_DEV_RD_DEV_FAIULRE_PC,
                                 POSTCODE_SEVERITY_ERR);
                return;
@@ -2124,7 +1938,6 @@ setup_crash_devices_work_queue(struct work_struct *work)
        if (localCrashCreateBusMsg.cmd.create_bus.channel_addr != 0)
                bus_create(&localCrashCreateBusMsg);
        else {
-               LOGERR("CrashCreateBusMsg is null, no dump will be taken");
                POSTCODE_LINUX_2(CRASH_DEV_BUS_NULL_FAILURE_PC,
                                 POSTCODE_SEVERITY_ERR);
                return;
@@ -2134,21 +1947,19 @@ setup_crash_devices_work_queue(struct work_struct *work)
        if (localCrashCreateDevMsg.cmd.create_device.channel_addr != 0)
                my_device_create(&localCrashCreateDevMsg);
        else {
-               LOGERR("CrashCreateDevMsg is null, no dump will be taken");
                POSTCODE_LINUX_2(CRASH_DEV_DEV_NULL_FAILURE_PC,
                                 POSTCODE_SEVERITY_ERR);
                return;
        }
-       LOGINF("Bus and device ready for dumping");
        POSTCODE_LINUX_2(CRASH_DEV_EXIT_PC, POSTCODE_SEVERITY_INFO);
        return;
 
 Away:
 
-       Poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_SLOW;
+       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
@@ -2178,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);
@@ -2196,12 +2006,10 @@ 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) {
-               LOGERR("(%lu) failed", bus_no);
+       if (!p)
                return FALSE;
-       }
        memcpy(bus_info, p, sizeof(struct visorchipset_bus_info));
        return TRUE;
 }
@@ -2210,12 +2018,10 @@ 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) {
-               LOGERR("(%lu) failed", bus_no);
+       if (!p)
                return FALSE;
-       }
        p->bus_driver_context = context;
        return TRUE;
 }
@@ -2225,12 +2031,10 @@ 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) {
-               LOGERR("(%lu,%lu) failed", bus_no, dev_no);
+       if (!p)
                return FALSE;
-       }
        memcpy(dev_info, p, sizeof(struct visorchipset_device_info));
        return TRUE;
 }
@@ -2240,12 +2044,10 @@ 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) {
-               LOGERR("(%lu,%lu) failed", bus_no, dev_no);
+       if (!p)
                return FALSE;
-       }
        p->bus_driver_context = context;
        return TRUE;
 }
@@ -2273,10 +2075,9 @@ visorchipset_cache_alloc(struct kmem_cache *pool, BOOL ok_to_block,
         */
        gfp |= __GFP_NORETRY;
        p = kmem_cache_alloc(pool, gfp);
-       if (!p) {
-               LOGERR("kmem_cache_alloc failed early @%s:%d\n", fn, ln);
+       if (!p)
                return NULL;
-       }
+
        atomic_inc(&Visorchipset_cache_buffers_in_use);
        return p;
 }
@@ -2286,10 +2087,9 @@ visorchipset_cache_alloc(struct kmem_cache *pool, BOOL ok_to_block,
 void
 visorchipset_cache_free(struct kmem_cache *pool, void *p, char *fn, int ln)
 {
-       if (!p) {
-               LOGERR("NULL pointer @%s:%d\n", fn, ln);
+       if (!p)
                return;
-       }
+
        atomic_dec(&Visorchipset_cache_buffers_in_use);
        kmem_cache_free(pool, p);
 }
@@ -2348,34 +2148,18 @@ static int __init
 visorchipset_init(void)
 {
        int rc = 0, x = 0;
-       char s[64];
        HOSTADDRESS addr;
 
        if (!unisys_spar_platform)
                return -ENODEV;
 
-       LOGINF("chipset driver version %s loaded", VERSION);
-       /* process module options */
-       POSTCODE_LINUX_2(DRIVER_ENTRY_PC, POSTCODE_SEVERITY_INFO);
-
-       LOGINF("option - testvnic=%d", visorchipset_testvnic);
-       LOGINF("option - testvnicclient=%d", visorchipset_testvnicclient);
-       LOGINF("option - testmsg=%d", visorchipset_testmsg);
-       LOGINF("option - testteardown=%d", visorchipset_testteardown);
-       LOGINF("option - major=%d", visorchipset_major);
-       LOGINF("option - serverregwait=%d", visorchipset_serverregwait);
-       LOGINF("option - clientregwait=%d", visorchipset_clientregwait);
-       LOGINF("option - holdchipsetready=%d", visorchipset_holdchipsetready);
-
        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) {
-               ERRDRV("testvnic option no longer supported: (status = %d)\n",
-                      x);
                POSTCODE_LINUX_3(CHIPSET_INIT_FAILURE_PC, x, DIAG_SEVERITY_ERR);
                rc = x;
                goto Away;
@@ -2383,98 +2167,83 @@ 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))) {
-                       LOGINF("Channel %s (ControlVm) discovered",
-                              visorchannel_id(ControlVm_channel, s));
+                               visorchannel_get_header(controlvm_channel))) {
                        initialize_controlvm_payload();
                } else {
-                       LOGERR("controlvm channel is invalid");
-                       visorchannel_destroy(ControlVm_channel);
-                       ControlVm_channel = NULL;
+                       visorchannel_destroy(controlvm_channel);
+                       controlvm_channel = NULL;
                        return -ENODEV;
                }
        } else {
-               LOGERR("no controlvm channel discovered");
                return -ENODEV;
        }
 
        MajorDev = MKDEV(visorchipset_major, 0);
-       rc = visorchipset_file_init(MajorDev, &ControlVm_channel);
+       rc = visorchipset_file_init(MajorDev, &controlvm_channel);
        if (rc < 0) {
-               ERRDRV("visorchipset_file_init(MajorDev, &ControlVm_channel): error (status=%d)\n", rc);
                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,
                              sizeof(struct putfile_buffer_entry),
                              0, SLAB_HWCACHE_ALIGN, NULL);
        if (!Putfile_buffer_list_pool) {
-               ERRDRV("failed to alloc Putfile_buffer_list_pool: (status=-1)\n");
                POSTCODE_LINUX_2(CHIPSET_INIT_FAILURE_PC, DIAG_SEVERITY_ERR);
                rc = -1;
                goto Away;
        }
-       if (visorchipset_disable_controlvm) {
-               LOGINF("visorchipset_init:controlvm disabled");
-       } else {
+       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) {
-                       ERRDRV("cannot create controlvm workqueue: (status=%d)\n",
-                              -ENOMEM);
+               if (!periodic_controlvm_workqueue) {
                        POSTCODE_LINUX_2(CREATE_WORKQUEUE_FAILED_PC,
                                         DIAG_SEVERITY_ERR);
                        rc = -ENOMEM;
                        goto Away;
                }
-               Most_recent_message_jiffies = jiffies;
-               Poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST;
-               rc = queue_delayed_work(Periodic_controlvm_workqueue,
-                                       &Periodic_controlvm_work, Poll_jiffies);
+               most_recent_message_jiffies = jiffies;
+               poll_jiffies = POLLJIFFIES_CONTROLVMCHANNEL_FAST;
+               rc = queue_delayed_work(periodic_controlvm_workqueue,
+                                       &periodic_controlvm_work, poll_jiffies);
                if (rc < 0) {
-                       ERRDRV("queue_delayed_work(Periodic_controlvm_workqueue, &Periodic_controlvm_work, Poll_jiffies): error (status=%d)\n", rc);
                        POSTCODE_LINUX_2(QUEUE_DELAYED_WORK_PC,
                                         DIAG_SEVERITY_ERR);
                        goto Away;
                }
-
        }
 
        Visorchipset_platform_device.dev.devt = MajorDev;
        if (platform_device_register(&Visorchipset_platform_device) < 0) {
-               ERRDRV("platform_device_register(visorchipset) failed: (status=-1)\n");
                POSTCODE_LINUX_2(DEVICE_REGISTER_FAILURE_PC, DIAG_SEVERITY_ERR);
                rc = -1;
                goto Away;
        }
-       LOGINF("visorchipset device created");
        POSTCODE_LINUX_2(CHIPSET_INIT_SUCCESS_PC, POSTCODE_SEVERITY_INFO);
        rc = 0;
 Away:
        if (rc) {
-               LOGERR("visorchipset_init failed");
                POSTCODE_LINUX_3(CHIPSET_INIT_FAILURE_PC, rc,
                                 POSTCODE_SEVERITY_ERR);
        }
@@ -2484,20 +2253,17 @@ Away:
 static void
 visorchipset_exit(void)
 {
-       char s[99];
-
        POSTCODE_LINUX_2(DRIVER_EXIT_PC, POSTCODE_SEVERITY_INFO);
 
        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;
@@ -2505,19 +2271,16 @@ 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));
 
-       LOGINF("Channel %s (ControlVm) disconnected",
-              visorchannel_id(ControlVm_channel, s));
-       visorchannel_destroy(ControlVm_channel);
+       visorchannel_destroy(controlvm_channel);
 
        visorchipset_file_cleanup();
        POSTCODE_LINUX_2(DRIVER_EXIT_PC, POSTCODE_SEVERITY_INFO);
-       LOGINF("chipset driver unloaded");
 }
 
 module_param_named(testvnic, visorchipset_testvnic, int, S_IRUGO);