Commit c3d9a224 authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman

staging: unisys: fix CamelCase channel name ControlVm_channel

Rename the channel:

ControlVm_channel => controlvm_channel

Update all references to use the new name. Fix the odd bracketing in the
while() statement with the reference to controlvm_channel, too, so the
patch doesn't generate a warning.
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0639ba67
...@@ -96,7 +96,7 @@ static struct controlvm_message_packet g_devicechangestate_packet; ...@@ -96,7 +96,7 @@ static struct controlvm_message_packet g_devicechangestate_packet;
static LIST_HEAD(bus_info_list); static LIST_HEAD(bus_info_list);
static LIST_HEAD(dev_info_list); static LIST_HEAD(dev_info_list);
static struct visorchannel *ControlVm_channel; static struct visorchannel *controlvm_channel;
struct controlvm_payload_info { struct controlvm_payload_info {
u8 __iomem *ptr; /* pointer to base address of payload pool */ u8 __iomem *ptr; /* pointer to base address of payload pool */
...@@ -353,7 +353,7 @@ static ssize_t toolaction_show(struct device *dev, ...@@ -353,7 +353,7 @@ static ssize_t toolaction_show(struct device *dev,
{ {
u8 toolAction; u8 toolAction;
visorchannel_read(ControlVm_channel, visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct spar_controlvm_channel_protocol,
tool_action), &toolAction, sizeof(u8)); tool_action), &toolAction, sizeof(u8));
return scnprintf(buf, PAGE_SIZE, "%u\n", toolAction); return scnprintf(buf, PAGE_SIZE, "%u\n", toolAction);
...@@ -369,7 +369,7 @@ static ssize_t toolaction_store(struct device *dev, ...@@ -369,7 +369,7 @@ static ssize_t toolaction_store(struct device *dev,
if (kstrtou8(buf, 10, &toolAction) != 0) if (kstrtou8(buf, 10, &toolAction) != 0)
return -EINVAL; return -EINVAL;
ret = visorchannel_write(ControlVm_channel, ret = visorchannel_write(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, tool_action), offsetof(struct spar_controlvm_channel_protocol, tool_action),
&toolAction, sizeof(u8)); &toolAction, sizeof(u8));
...@@ -384,7 +384,7 @@ static ssize_t boottotool_show(struct device *dev, ...@@ -384,7 +384,7 @@ static ssize_t boottotool_show(struct device *dev,
{ {
struct efi_spar_indication efiSparIndication; struct efi_spar_indication efiSparIndication;
visorchannel_read(ControlVm_channel, visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct spar_controlvm_channel_protocol,
efi_spar_ind), &efiSparIndication, efi_spar_ind), &efiSparIndication,
sizeof(struct efi_spar_indication)); sizeof(struct efi_spar_indication));
...@@ -403,7 +403,7 @@ static ssize_t boottotool_store(struct device *dev, ...@@ -403,7 +403,7 @@ static ssize_t boottotool_store(struct device *dev,
return -EINVAL; return -EINVAL;
efiSparIndication.boot_to_tool = val; efiSparIndication.boot_to_tool = val;
ret = visorchannel_write(ControlVm_channel, ret = visorchannel_write(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct spar_controlvm_channel_protocol,
efi_spar_ind), efi_spar_ind),
&(efiSparIndication), &(efiSparIndication),
...@@ -419,7 +419,7 @@ static ssize_t error_show(struct device *dev, struct device_attribute *attr, ...@@ -419,7 +419,7 @@ static ssize_t error_show(struct device *dev, struct device_attribute *attr,
{ {
u32 error; u32 error;
visorchannel_read(ControlVm_channel, offsetof( visorchannel_read(controlvm_channel, offsetof(
struct spar_controlvm_channel_protocol, installation_error), struct spar_controlvm_channel_protocol, installation_error),
&error, sizeof(u32)); &error, sizeof(u32));
return scnprintf(buf, PAGE_SIZE, "%i\n", error); return scnprintf(buf, PAGE_SIZE, "%i\n", error);
...@@ -434,7 +434,7 @@ static ssize_t error_store(struct device *dev, struct device_attribute *attr, ...@@ -434,7 +434,7 @@ static ssize_t error_store(struct device *dev, struct device_attribute *attr,
if (kstrtou32(buf, 10, &error) != 0) if (kstrtou32(buf, 10, &error) != 0)
return -EINVAL; return -EINVAL;
ret = visorchannel_write(ControlVm_channel, ret = visorchannel_write(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct spar_controlvm_channel_protocol,
installation_error), installation_error),
&error, sizeof(u32)); &error, sizeof(u32));
...@@ -448,7 +448,7 @@ static ssize_t textid_show(struct device *dev, struct device_attribute *attr, ...@@ -448,7 +448,7 @@ static ssize_t textid_show(struct device *dev, struct device_attribute *attr,
{ {
u32 textId; u32 textId;
visorchannel_read(ControlVm_channel, offsetof( visorchannel_read(controlvm_channel, offsetof(
struct spar_controlvm_channel_protocol, installation_text_id), struct spar_controlvm_channel_protocol, installation_text_id),
&textId, sizeof(u32)); &textId, sizeof(u32));
return scnprintf(buf, PAGE_SIZE, "%i\n", textId); return scnprintf(buf, PAGE_SIZE, "%i\n", textId);
...@@ -463,7 +463,7 @@ static ssize_t textid_store(struct device *dev, struct device_attribute *attr, ...@@ -463,7 +463,7 @@ static ssize_t textid_store(struct device *dev, struct device_attribute *attr,
if (kstrtou32(buf, 10, &textId) != 0) if (kstrtou32(buf, 10, &textId) != 0)
return -EINVAL; return -EINVAL;
ret = visorchannel_write(ControlVm_channel, ret = visorchannel_write(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct spar_controlvm_channel_protocol,
installation_text_id), installation_text_id),
&textId, sizeof(u32)); &textId, sizeof(u32));
...@@ -478,7 +478,7 @@ static ssize_t remaining_steps_show(struct device *dev, ...@@ -478,7 +478,7 @@ static ssize_t remaining_steps_show(struct device *dev,
{ {
u16 remainingSteps; u16 remainingSteps;
visorchannel_read(ControlVm_channel, visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct spar_controlvm_channel_protocol,
installation_remaining_steps), installation_remaining_steps),
&remainingSteps, &remainingSteps,
...@@ -495,7 +495,7 @@ static ssize_t remaining_steps_store(struct device *dev, ...@@ -495,7 +495,7 @@ static ssize_t remaining_steps_store(struct device *dev,
if (kstrtou16(buf, 10, &remainingSteps) != 0) if (kstrtou16(buf, 10, &remainingSteps) != 0)
return -EINVAL; return -EINVAL;
ret = visorchannel_write(ControlVm_channel, ret = visorchannel_write(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct spar_controlvm_channel_protocol,
installation_remaining_steps), installation_remaining_steps),
&remainingSteps, sizeof(u16)); &remainingSteps, sizeof(u16));
...@@ -714,7 +714,7 @@ controlvm_respond(struct controlvm_message_header *msgHdr, int response) ...@@ -714,7 +714,7 @@ controlvm_respond(struct controlvm_message_header *msgHdr, int response)
if (outmsg.hdr.flags.test_message == 1) if (outmsg.hdr.flags.test_message == 1)
return; return;
if (!visorchannel_signalinsert(ControlVm_channel, if (!visorchannel_signalinsert(controlvm_channel,
CONTROLVM_QUEUE_REQUEST, &outmsg)) { CONTROLVM_QUEUE_REQUEST, &outmsg)) {
return; return;
} }
...@@ -729,7 +729,7 @@ controlvm_respond_chipset_init(struct controlvm_message_header *msgHdr, ...@@ -729,7 +729,7 @@ controlvm_respond_chipset_init(struct controlvm_message_header *msgHdr,
controlvm_init_response(&outmsg, msgHdr, response); controlvm_init_response(&outmsg, msgHdr, response);
outmsg.cmd.init_chipset.features = features; outmsg.cmd.init_chipset.features = features;
if (!visorchannel_signalinsert(ControlVm_channel, if (!visorchannel_signalinsert(controlvm_channel,
CONTROLVM_QUEUE_REQUEST, &outmsg)) { CONTROLVM_QUEUE_REQUEST, &outmsg)) {
return; return;
} }
...@@ -744,7 +744,7 @@ static void controlvm_respond_physdev_changestate( ...@@ -744,7 +744,7 @@ static void controlvm_respond_physdev_changestate(
controlvm_init_response(&outmsg, msgHdr, response); controlvm_init_response(&outmsg, msgHdr, response);
outmsg.cmd.device_change_state.state = state; outmsg.cmd.device_change_state.state = state;
outmsg.cmd.device_change_state.flags.phys_device = 1; outmsg.cmd.device_change_state.flags.phys_device = 1;
if (!visorchannel_signalinsert(ControlVm_channel, if (!visorchannel_signalinsert(controlvm_channel,
CONTROLVM_QUEUE_REQUEST, &outmsg)) { CONTROLVM_QUEUE_REQUEST, &outmsg)) {
return; return;
} }
...@@ -758,7 +758,7 @@ visorchipset_save_message(struct controlvm_message *msg, ...@@ -758,7 +758,7 @@ visorchipset_save_message(struct controlvm_message *msg,
u16 localSavedCrashMsgCount; u16 localSavedCrashMsgCount;
/* get saved message count */ /* get saved message count */
if (visorchannel_read(ControlVm_channel, if (visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct spar_controlvm_channel_protocol,
saved_crash_message_count), saved_crash_message_count),
&localSavedCrashMsgCount, sizeof(u16)) < 0) { &localSavedCrashMsgCount, sizeof(u16)) < 0) {
...@@ -775,7 +775,7 @@ visorchipset_save_message(struct controlvm_message *msg, ...@@ -775,7 +775,7 @@ visorchipset_save_message(struct controlvm_message *msg,
} }
/* get saved crash message offset */ /* get saved crash message offset */
if (visorchannel_read(ControlVm_channel, if (visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct spar_controlvm_channel_protocol,
saved_crash_message_offset), saved_crash_message_offset),
&localSavedCrashMsgOffset, sizeof(u32)) < 0) { &localSavedCrashMsgOffset, sizeof(u32)) < 0) {
...@@ -785,7 +785,7 @@ visorchipset_save_message(struct controlvm_message *msg, ...@@ -785,7 +785,7 @@ visorchipset_save_message(struct controlvm_message *msg,
} }
if (type == CRASH_BUS) { if (type == CRASH_BUS) {
if (visorchannel_write(ControlVm_channel, if (visorchannel_write(controlvm_channel,
localSavedCrashMsgOffset, localSavedCrashMsgOffset,
msg, msg,
sizeof(struct controlvm_message)) < 0) { sizeof(struct controlvm_message)) < 0) {
...@@ -794,7 +794,7 @@ visorchipset_save_message(struct controlvm_message *msg, ...@@ -794,7 +794,7 @@ visorchipset_save_message(struct controlvm_message *msg,
return; return;
} }
} else { } else {
if (visorchannel_write(ControlVm_channel, if (visorchannel_write(controlvm_channel,
localSavedCrashMsgOffset + localSavedCrashMsgOffset +
sizeof(struct controlvm_message), msg, sizeof(struct controlvm_message), msg,
sizeof(struct controlvm_message)) < 0) { sizeof(struct controlvm_message)) < 0) {
...@@ -862,7 +862,7 @@ device_changestate_responder(enum controlvm_id cmdId, ...@@ -862,7 +862,7 @@ device_changestate_responder(enum controlvm_id cmdId,
outmsg.cmd.device_change_state.dev_no = devNo; outmsg.cmd.device_change_state.dev_no = devNo;
outmsg.cmd.device_change_state.state = responseState; outmsg.cmd.device_change_state.state = responseState;
if (!visorchannel_signalinsert(ControlVm_channel, if (!visorchannel_signalinsert(controlvm_channel,
CONTROLVM_QUEUE_REQUEST, &outmsg)) CONTROLVM_QUEUE_REQUEST, &outmsg))
return; return;
...@@ -1363,11 +1363,11 @@ destroy_controlvm_payload_info(struct controlvm_payload_info *info) ...@@ -1363,11 +1363,11 @@ destroy_controlvm_payload_info(struct controlvm_payload_info *info)
static void static void
initialize_controlvm_payload(void) initialize_controlvm_payload(void)
{ {
HOSTADDRESS phys_addr = visorchannel_get_physaddr(ControlVm_channel); HOSTADDRESS phys_addr = visorchannel_get_physaddr(controlvm_channel);
u64 payloadOffset = 0; u64 payloadOffset = 0;
u32 payloadBytes = 0; u32 payloadBytes = 0;
if (visorchannel_read(ControlVm_channel, if (visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct spar_controlvm_channel_protocol,
request_payload_offset), request_payload_offset),
&payloadOffset, sizeof(payloadOffset)) < 0) { &payloadOffset, sizeof(payloadOffset)) < 0) {
...@@ -1375,7 +1375,7 @@ initialize_controlvm_payload(void) ...@@ -1375,7 +1375,7 @@ initialize_controlvm_payload(void)
POSTCODE_SEVERITY_ERR); POSTCODE_SEVERITY_ERR);
return; return;
} }
if (visorchannel_read(ControlVm_channel, if (visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct spar_controlvm_channel_protocol,
request_payload_bytes), request_payload_bytes),
&payloadBytes, sizeof(payloadBytes)) < 0) { &payloadBytes, sizeof(payloadBytes)) < 0) {
...@@ -1468,7 +1468,7 @@ chipset_notready(struct controlvm_message_header *msgHdr) ...@@ -1468,7 +1468,7 @@ chipset_notready(struct controlvm_message_header *msgHdr)
static BOOL static BOOL
read_controlvm_event(struct controlvm_message *msg) read_controlvm_event(struct controlvm_message *msg)
{ {
if (visorchannel_signalremove(ControlVm_channel, if (visorchannel_signalremove(controlvm_channel,
CONTROLVM_QUEUE_EVENT, msg)) { CONTROLVM_QUEUE_EVENT, msg)) {
/* got a message */ /* got a message */
if (msg->hdr.flags.test_message == 1) if (msg->hdr.flags.test_message == 1)
...@@ -1727,8 +1727,8 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr) ...@@ -1727,8 +1727,8 @@ handle_command(struct controlvm_message inmsg, HOSTADDRESS channel_addr)
if (!isLocalAddr) { if (!isLocalAddr) {
controlvm_init_response(&ackmsg, &inmsg.hdr, controlvm_init_response(&ackmsg, &inmsg.hdr,
CONTROLVM_RESP_SUCCESS); CONTROLVM_RESP_SUCCESS);
if (ControlVm_channel) if (controlvm_channel)
visorchannel_signalinsert(ControlVm_channel, visorchannel_signalinsert(controlvm_channel,
CONTROLVM_QUEUE_ACK, CONTROLVM_QUEUE_ACK,
&ackmsg); &ackmsg);
} }
...@@ -1838,10 +1838,10 @@ controlvm_periodic_work(struct work_struct *work) ...@@ -1838,10 +1838,10 @@ controlvm_periodic_work(struct work_struct *work)
} }
} }
while (visorchannel_signalremove(ControlVm_channel, while (visorchannel_signalremove(controlvm_channel,
CONTROLVM_QUEUE_RESPONSE, CONTROLVM_QUEUE_RESPONSE,
&inmsg)) { &inmsg))
} ;
if (!gotACommand) { if (!gotACommand) {
if (ControlVm_Pending_Msg_Valid) { if (ControlVm_Pending_Msg_Valid) {
/* we throttled processing of a prior /* we throttled processing of a prior
...@@ -1860,7 +1860,7 @@ controlvm_periodic_work(struct work_struct *work) ...@@ -1860,7 +1860,7 @@ controlvm_periodic_work(struct work_struct *work)
most_recent_message_jiffies = jiffies; most_recent_message_jiffies = jiffies;
if (handle_command(inmsg, if (handle_command(inmsg,
visorchannel_get_physaddr visorchannel_get_physaddr
(ControlVm_channel))) (controlvm_channel)))
gotACommand = read_controlvm_event(&inmsg); gotACommand = read_controlvm_event(&inmsg);
else { else {
/* this is a scenario where throttling /* this is a scenario where throttling
...@@ -1927,7 +1927,7 @@ setup_crash_devices_work_queue(struct work_struct *work) ...@@ -1927,7 +1927,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
chipset_init(&msg); chipset_init(&msg);
/* get saved message count */ /* get saved message count */
if (visorchannel_read(ControlVm_channel, if (visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct spar_controlvm_channel_protocol,
saved_crash_message_count), saved_crash_message_count),
&localSavedCrashMsgCount, sizeof(u16)) < 0) { &localSavedCrashMsgCount, sizeof(u16)) < 0) {
...@@ -1944,7 +1944,7 @@ setup_crash_devices_work_queue(struct work_struct *work) ...@@ -1944,7 +1944,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
} }
/* get saved crash message offset */ /* get saved crash message offset */
if (visorchannel_read(ControlVm_channel, if (visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct spar_controlvm_channel_protocol,
saved_crash_message_offset), saved_crash_message_offset),
&localSavedCrashMsgOffset, sizeof(u32)) < 0) { &localSavedCrashMsgOffset, sizeof(u32)) < 0) {
...@@ -1954,7 +1954,7 @@ setup_crash_devices_work_queue(struct work_struct *work) ...@@ -1954,7 +1954,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
} }
/* read create device message for storage bus offset */ /* read create device message for storage bus offset */
if (visorchannel_read(ControlVm_channel, if (visorchannel_read(controlvm_channel,
localSavedCrashMsgOffset, localSavedCrashMsgOffset,
&localCrashCreateBusMsg, &localCrashCreateBusMsg,
sizeof(struct controlvm_message)) < 0) { sizeof(struct controlvm_message)) < 0) {
...@@ -1964,7 +1964,7 @@ setup_crash_devices_work_queue(struct work_struct *work) ...@@ -1964,7 +1964,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
} }
/* read create device message for storage device */ /* read create device message for storage device */
if (visorchannel_read(ControlVm_channel, if (visorchannel_read(controlvm_channel,
localSavedCrashMsgOffset + localSavedCrashMsgOffset +
sizeof(struct controlvm_message), sizeof(struct controlvm_message),
&localCrashCreateDevMsg, &localCrashCreateDevMsg,
...@@ -2208,17 +2208,17 @@ visorchipset_init(void) ...@@ -2208,17 +2208,17 @@ visorchipset_init(void)
addr = controlvm_get_channel_address(); addr = controlvm_get_channel_address();
if (addr != 0) { if (addr != 0) {
ControlVm_channel = controlvm_channel =
visorchannel_create_with_lock visorchannel_create_with_lock
(addr, (addr,
sizeof(struct spar_controlvm_channel_protocol), sizeof(struct spar_controlvm_channel_protocol),
spar_controlvm_channel_protocol_uuid); spar_controlvm_channel_protocol_uuid);
if (SPAR_CONTROLVM_CHANNEL_OK_CLIENT( if (SPAR_CONTROLVM_CHANNEL_OK_CLIENT(
visorchannel_get_header(ControlVm_channel))) { visorchannel_get_header(controlvm_channel))) {
initialize_controlvm_payload(); initialize_controlvm_payload();
} else { } else {
visorchannel_destroy(ControlVm_channel); visorchannel_destroy(controlvm_channel);
ControlVm_channel = NULL; controlvm_channel = NULL;
return -ENODEV; return -ENODEV;
} }
} else { } else {
...@@ -2226,7 +2226,7 @@ visorchipset_init(void) ...@@ -2226,7 +2226,7 @@ visorchipset_init(void)
} }
MajorDev = MKDEV(visorchipset_major, 0); MajorDev = MKDEV(visorchipset_major, 0);
rc = visorchipset_file_init(MajorDev, &ControlVm_channel); rc = visorchipset_file_init(MajorDev, &controlvm_channel);
if (rc < 0) { if (rc < 0) {
POSTCODE_LINUX_2(CHIPSET_INIT_FAILURE_PC, DIAG_SEVERITY_ERR); POSTCODE_LINUX_2(CHIPSET_INIT_FAILURE_PC, DIAG_SEVERITY_ERR);
goto Away; goto Away;
...@@ -2320,7 +2320,7 @@ visorchipset_exit(void) ...@@ -2320,7 +2320,7 @@ visorchipset_exit(void)
memset(&g_del_dump_msg_hdr, 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(); visorchipset_file_cleanup();
POSTCODE_LINUX_2(DRIVER_EXIT_PC, POSTCODE_SEVERITY_INFO); POSTCODE_LINUX_2(DRIVER_EXIT_PC, POSTCODE_SEVERITY_INFO);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment