Commit e80ffd4b authored by Charles Daniels's avatar Charles Daniels Committed by Greg Kroah-Hartman

staging: unisys: visorbus: fix multi-line function definition

Fixed incorrectly styled function definitions in visorbus/visorchipset.c
by placing the function names on the same line as the return.
Signed-off-by: default avatarCharles Daniels <cdaniels@fastmail.com>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Reviewed-by: default avatarDavid Binder <david.binder@unisys.com>
Reviewed-by: default avatarTim Sell <timothy.sell@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eb30ed58
...@@ -285,8 +285,7 @@ static void parser_done(struct parser_context *ctx) ...@@ -285,8 +285,7 @@ static void parser_done(struct parser_context *ctx)
kfree(ctx); kfree(ctx);
} }
static void * static void *parser_string_get(struct parser_context *ctx)
parser_string_get(struct parser_context *ctx)
{ {
u8 *pscan; u8 *pscan;
unsigned long nscan; unsigned long nscan;
...@@ -319,8 +318,7 @@ parser_string_get(struct parser_context *ctx) ...@@ -319,8 +318,7 @@ parser_string_get(struct parser_context *ctx)
return value; return value;
} }
static void * static void *parser_name_get(struct parser_context *ctx)
parser_name_get(struct parser_context *ctx)
{ {
struct visor_controlvm_parameters_header *phdr = NULL; struct visor_controlvm_parameters_header *phdr = NULL;
...@@ -373,9 +371,9 @@ struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no, ...@@ -373,9 +371,9 @@ struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
return vdev; return vdev;
} }
static void static void controlvm_init_response(struct controlvm_message *msg,
controlvm_init_response(struct controlvm_message *msg, struct controlvm_message_header *msg_hdr,
struct controlvm_message_header *msg_hdr, int response) int response)
{ {
memset(msg, 0, sizeof(struct controlvm_message)); memset(msg, 0, sizeof(struct controlvm_message));
memcpy(&msg->hdr, msg_hdr, sizeof(struct controlvm_message_header)); memcpy(&msg->hdr, msg_hdr, sizeof(struct controlvm_message_header));
...@@ -388,8 +386,8 @@ controlvm_init_response(struct controlvm_message *msg, ...@@ -388,8 +386,8 @@ controlvm_init_response(struct controlvm_message *msg,
} }
} }
static int static int controlvm_respond_chipset_init(
controlvm_respond_chipset_init(struct controlvm_message_header *msg_hdr, struct controlvm_message_header *msg_hdr,
int response, int response,
enum visor_chipset_feature features) enum visor_chipset_feature features)
{ {
...@@ -401,8 +399,7 @@ controlvm_respond_chipset_init(struct controlvm_message_header *msg_hdr, ...@@ -401,8 +399,7 @@ controlvm_respond_chipset_init(struct controlvm_message_header *msg_hdr,
CONTROLVM_QUEUE_REQUEST, &outmsg); CONTROLVM_QUEUE_REQUEST, &outmsg);
} }
static int static int chipset_init(struct controlvm_message *inmsg)
chipset_init(struct controlvm_message *inmsg)
{ {
static int chipset_inited; static int chipset_inited;
enum visor_chipset_feature features = 0; enum visor_chipset_feature features = 0;
...@@ -436,8 +433,8 @@ chipset_init(struct controlvm_message *inmsg) ...@@ -436,8 +433,8 @@ chipset_init(struct controlvm_message *inmsg)
return res; return res;
} }
static int static int controlvm_respond(struct controlvm_message_header *msg_hdr,
controlvm_respond(struct controlvm_message_header *msg_hdr, int response, int response,
struct visor_segment_state *state) struct visor_segment_state *state)
{ {
struct controlvm_message outmsg; struct controlvm_message outmsg;
...@@ -460,8 +457,8 @@ enum crash_obj_type { ...@@ -460,8 +457,8 @@ enum crash_obj_type {
CRASH_BUS, CRASH_BUS,
}; };
static int static int save_crash_message(struct controlvm_message *msg,
save_crash_message(struct controlvm_message *msg, enum crash_obj_type cr_type) enum crash_obj_type cr_type)
{ {
u32 local_crash_msg_offset; u32 local_crash_msg_offset;
u16 local_crash_msg_count; u16 local_crash_msg_count;
...@@ -525,8 +522,7 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type cr_type) ...@@ -525,8 +522,7 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type cr_type)
return 0; return 0;
} }
static int static int controlvm_responder(enum controlvm_id cmd_id,
controlvm_responder(enum controlvm_id cmd_id,
struct controlvm_message_header *pending_msg_hdr, struct controlvm_message_header *pending_msg_hdr,
int response) int response)
{ {
...@@ -539,8 +535,8 @@ controlvm_responder(enum controlvm_id cmd_id, ...@@ -539,8 +535,8 @@ controlvm_responder(enum controlvm_id cmd_id,
return controlvm_respond(pending_msg_hdr, response, NULL); return controlvm_respond(pending_msg_hdr, response, NULL);
} }
static int static int device_changestate_responder(
device_changestate_responder(enum controlvm_id cmd_id, enum controlvm_id cmd_id,
struct visor_device *p, int response, struct visor_device *p, int response,
struct visor_segment_state response_state) struct visor_segment_state response_state)
{ {
...@@ -563,8 +559,7 @@ device_changestate_responder(enum controlvm_id cmd_id, ...@@ -563,8 +559,7 @@ device_changestate_responder(enum controlvm_id cmd_id,
CONTROLVM_QUEUE_REQUEST, &outmsg); CONTROLVM_QUEUE_REQUEST, &outmsg);
} }
static int static int visorbus_create(struct controlvm_message *inmsg)
visorbus_create(struct controlvm_message *inmsg)
{ {
struct controlvm_message_packet *cmd = &inmsg->cmd; struct controlvm_message_packet *cmd = &inmsg->cmd;
struct controlvm_message_header *pmsg_hdr = NULL; struct controlvm_message_header *pmsg_hdr = NULL;
...@@ -644,8 +639,7 @@ visorbus_create(struct controlvm_message *inmsg) ...@@ -644,8 +639,7 @@ visorbus_create(struct controlvm_message *inmsg)
return err; return err;
} }
static int static int visorbus_destroy(struct controlvm_message *inmsg)
visorbus_destroy(struct controlvm_message *inmsg)
{ {
struct controlvm_message_packet *cmd = &inmsg->cmd; struct controlvm_message_packet *cmd = &inmsg->cmd;
struct controlvm_message_header *pmsg_hdr = NULL; struct controlvm_message_header *pmsg_hdr = NULL;
...@@ -689,8 +683,7 @@ visorbus_destroy(struct controlvm_message *inmsg) ...@@ -689,8 +683,7 @@ visorbus_destroy(struct controlvm_message *inmsg)
return err; return err;
} }
static int static int visorbus_configure(struct controlvm_message *inmsg,
visorbus_configure(struct controlvm_message *inmsg,
struct parser_context *parser_ctx) struct parser_context *parser_ctx)
{ {
struct controlvm_message_packet *cmd = &inmsg->cmd; struct controlvm_message_packet *cmd = &inmsg->cmd;
...@@ -736,8 +729,7 @@ visorbus_configure(struct controlvm_message *inmsg, ...@@ -736,8 +729,7 @@ visorbus_configure(struct controlvm_message *inmsg,
return err; return err;
} }
static int static int visorbus_device_create(struct controlvm_message *inmsg)
visorbus_device_create(struct controlvm_message *inmsg)
{ {
struct controlvm_message_packet *cmd = &inmsg->cmd; struct controlvm_message_packet *cmd = &inmsg->cmd;
struct controlvm_message_header *pmsg_hdr = NULL; struct controlvm_message_header *pmsg_hdr = NULL;
...@@ -833,8 +825,7 @@ visorbus_device_create(struct controlvm_message *inmsg) ...@@ -833,8 +825,7 @@ visorbus_device_create(struct controlvm_message *inmsg)
return err; return err;
} }
static int static int visorbus_device_changestate(struct controlvm_message *inmsg)
visorbus_device_changestate(struct controlvm_message *inmsg)
{ {
struct controlvm_message_packet *cmd = &inmsg->cmd; struct controlvm_message_packet *cmd = &inmsg->cmd;
struct controlvm_message_header *pmsg_hdr = NULL; struct controlvm_message_header *pmsg_hdr = NULL;
...@@ -894,8 +885,7 @@ visorbus_device_changestate(struct controlvm_message *inmsg) ...@@ -894,8 +885,7 @@ visorbus_device_changestate(struct controlvm_message *inmsg)
return err; return err;
} }
static int static int visorbus_device_destroy(struct controlvm_message *inmsg)
visorbus_device_destroy(struct controlvm_message *inmsg)
{ {
struct controlvm_message_packet *cmd = &inmsg->cmd; struct controlvm_message_packet *cmd = &inmsg->cmd;
struct controlvm_message_header *pmsg_hdr = NULL; struct controlvm_message_header *pmsg_hdr = NULL;
...@@ -961,8 +951,7 @@ visorbus_device_destroy(struct controlvm_message *inmsg) ...@@ -961,8 +951,7 @@ visorbus_device_destroy(struct controlvm_message *inmsg)
* *
* Return: a unique integer value * Return: a unique integer value
*/ */
static int static int parahotplug_next_id(void)
parahotplug_next_id(void)
{ {
static atomic_t id = ATOMIC_INIT(0); static atomic_t id = ATOMIC_INIT(0);
...@@ -976,8 +965,7 @@ parahotplug_next_id(void) ...@@ -976,8 +965,7 @@ parahotplug_next_id(void)
* *
* Return: expected expiration time (in jiffies) * Return: expected expiration time (in jiffies)
*/ */
static unsigned long static unsigned long parahotplug_next_expiration(void)
parahotplug_next_expiration(void)
{ {
return jiffies + msecs_to_jiffies(PARAHOTPLUG_TIMEOUT_MS); return jiffies + msecs_to_jiffies(PARAHOTPLUG_TIMEOUT_MS);
} }
...@@ -990,8 +978,8 @@ parahotplug_next_expiration(void) ...@@ -990,8 +978,8 @@ parahotplug_next_expiration(void)
* *
* Return: the request containing the provided message * Return: the request containing the provided message
*/ */
static struct parahotplug_request * static struct parahotplug_request *parahotplug_request_create(
parahotplug_request_create(struct controlvm_message *msg) struct controlvm_message *msg)
{ {
struct parahotplug_request *req; struct parahotplug_request *req;
...@@ -1010,8 +998,7 @@ parahotplug_request_create(struct controlvm_message *msg) ...@@ -1010,8 +998,7 @@ parahotplug_request_create(struct controlvm_message *msg)
* parahotplug_request_destroy() - free a parahotplug_request * parahotplug_request_destroy() - free a parahotplug_request
* @req: the request to deallocate * @req: the request to deallocate
*/ */
static void static void parahotplug_request_destroy(struct parahotplug_request *req)
parahotplug_request_destroy(struct parahotplug_request *req)
{ {
kfree(req); kfree(req);
} }
...@@ -1031,8 +1018,7 @@ static DEFINE_SPINLOCK(parahotplug_request_list_lock); ...@@ -1031,8 +1018,7 @@ static DEFINE_SPINLOCK(parahotplug_request_list_lock);
* *
* Return: 0 on success or -EINVAL on failure * Return: 0 on success or -EINVAL on failure
*/ */
static int static int parahotplug_request_complete(int id, u16 active)
parahotplug_request_complete(int id, u16 active)
{ {
struct list_head *pos; struct list_head *pos;
struct list_head *tmp; struct list_head *tmp;
...@@ -1159,8 +1145,7 @@ static const struct attribute_group *visorchipset_dev_groups[] = { ...@@ -1159,8 +1145,7 @@ static const struct attribute_group *visorchipset_dev_groups[] = {
* Cause uevent to run the user level script to do the disable/enable specified * Cause uevent to run the user level script to do the disable/enable specified
* in the parahotplug_request. * in the parahotplug_request.
*/ */
static int static int parahotplug_request_kickoff(struct parahotplug_request *req)
parahotplug_request_kickoff(struct parahotplug_request *req)
{ {
struct controlvm_message_packet *cmd = &req->msg.cmd; struct controlvm_message_packet *cmd = &req->msg.cmd;
char env_cmd[40], env_id[40], env_state[40], env_bus[40], env_dev[40], char env_cmd[40], env_id[40], env_state[40], env_bus[40], env_dev[40],
...@@ -1189,8 +1174,7 @@ parahotplug_request_kickoff(struct parahotplug_request *req) ...@@ -1189,8 +1174,7 @@ parahotplug_request_kickoff(struct parahotplug_request *req)
* off a udev script * off a udev script
* @inmsg: the message indicating whether to enable or disable * @inmsg: the message indicating whether to enable or disable
*/ */
static int static int parahotplug_process_message(struct controlvm_message *inmsg)
parahotplug_process_message(struct controlvm_message *inmsg)
{ {
struct parahotplug_request *req; struct parahotplug_request *req;
int err; int err;
...@@ -1241,8 +1225,7 @@ parahotplug_process_message(struct controlvm_message *inmsg) ...@@ -1241,8 +1225,7 @@ parahotplug_process_message(struct controlvm_message *inmsg)
* *
* Return: 0 on success, negative on failure * Return: 0 on success, negative on failure
*/ */
static int static int chipset_ready_uevent(struct controlvm_message_header *msg_hdr)
chipset_ready_uevent(struct controlvm_message_header *msg_hdr)
{ {
int res; int res;
...@@ -1262,8 +1245,7 @@ chipset_ready_uevent(struct controlvm_message_header *msg_hdr) ...@@ -1262,8 +1245,7 @@ chipset_ready_uevent(struct controlvm_message_header *msg_hdr)
* *
* Return: 0 on success, negative on failure * Return: 0 on success, negative on failure
*/ */
static int static int chipset_selftest_uevent(struct controlvm_message_header *msg_hdr)
chipset_selftest_uevent(struct controlvm_message_header *msg_hdr)
{ {
char env_selftest[20]; char env_selftest[20];
char *envp[] = { env_selftest, NULL }; char *envp[] = { env_selftest, NULL };
...@@ -1286,8 +1268,7 @@ chipset_selftest_uevent(struct controlvm_message_header *msg_hdr) ...@@ -1286,8 +1268,7 @@ chipset_selftest_uevent(struct controlvm_message_header *msg_hdr)
* *
* Return: 0 on success, negative on failure * Return: 0 on success, negative on failure
*/ */
static int static int chipset_notready_uevent(struct controlvm_message_header *msg_hdr)
chipset_notready_uevent(struct controlvm_message_header *msg_hdr)
{ {
int res = kobject_uevent(&chipset_dev->acpi_device->dev.kobj, int res = kobject_uevent(&chipset_dev->acpi_device->dev.kobj,
KOBJ_OFFLINE); KOBJ_OFFLINE);
...@@ -1330,8 +1311,8 @@ static int unisys_vmcall(unsigned long tuple, unsigned long param) ...@@ -1330,8 +1311,8 @@ static int unisys_vmcall(unsigned long tuple, unsigned long param)
} }
} }
static unsigned int static unsigned int issue_vmcall_io_controlvm_addr(u64 *control_addr,
issue_vmcall_io_controlvm_addr(u64 *control_addr, u32 *control_bytes) u32 *control_bytes)
{ {
chipset_dev->controlvm_addr.physaddr = virt_to_phys( chipset_dev->controlvm_addr.physaddr = virt_to_phys(
&chipset_dev->controlvm_addr.params); &chipset_dev->controlvm_addr.params);
...@@ -1357,8 +1338,7 @@ static u64 controlvm_get_channel_address(void) ...@@ -1357,8 +1338,7 @@ static u64 controlvm_get_channel_address(void)
return addr; return addr;
} }
static void static void setup_crash_devices_work_queue(struct work_struct *work)
setup_crash_devices_work_queue(struct work_struct *work)
{ {
struct controlvm_message local_crash_bus_msg; struct controlvm_message local_crash_bus_msg;
struct controlvm_message local_crash_dev_msg; struct controlvm_message local_crash_dev_msg;
...@@ -1437,8 +1417,7 @@ setup_crash_devices_work_queue(struct work_struct *work) ...@@ -1437,8 +1417,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
visorbus_device_create(&local_crash_dev_msg); visorbus_device_create(&local_crash_dev_msg);
} }
void void visorbus_create_response(struct visor_device *bus_info, int response)
visorbus_create_response(struct visor_device *bus_info, int response)
{ {
if (response >= 0) if (response >= 0)
bus_info->state.created = 1; bus_info->state.created = 1;
...@@ -1450,8 +1429,7 @@ visorbus_create_response(struct visor_device *bus_info, int response) ...@@ -1450,8 +1429,7 @@ visorbus_create_response(struct visor_device *bus_info, int response)
bus_info->pending_msg_hdr = NULL; bus_info->pending_msg_hdr = NULL;
} }
void void visorbus_destroy_response(struct visor_device *bus_info, int response)
visorbus_destroy_response(struct visor_device *bus_info, int response)
{ {
controlvm_responder(CONTROLVM_BUS_DESTROY, bus_info->pending_msg_hdr, controlvm_responder(CONTROLVM_BUS_DESTROY, bus_info->pending_msg_hdr,
response); response);
...@@ -1460,8 +1438,8 @@ visorbus_destroy_response(struct visor_device *bus_info, int response) ...@@ -1460,8 +1438,8 @@ visorbus_destroy_response(struct visor_device *bus_info, int response)
bus_info->pending_msg_hdr = NULL; bus_info->pending_msg_hdr = NULL;
} }
void void visorbus_device_create_response(struct visor_device *dev_info,
visorbus_device_create_response(struct visor_device *dev_info, int response) int response)
{ {
if (response >= 0) if (response >= 0)
dev_info->state.created = 1; dev_info->state.created = 1;
...@@ -1473,8 +1451,8 @@ visorbus_device_create_response(struct visor_device *dev_info, int response) ...@@ -1473,8 +1451,8 @@ visorbus_device_create_response(struct visor_device *dev_info, int response)
dev_info->pending_msg_hdr = NULL; dev_info->pending_msg_hdr = NULL;
} }
void void visorbus_device_destroy_response(struct visor_device *dev_info,
visorbus_device_destroy_response(struct visor_device *dev_info, int response) int response)
{ {
controlvm_responder(CONTROLVM_DEVICE_DESTROY, dev_info->pending_msg_hdr, controlvm_responder(CONTROLVM_DEVICE_DESTROY, dev_info->pending_msg_hdr,
response); response);
...@@ -1483,8 +1461,8 @@ visorbus_device_destroy_response(struct visor_device *dev_info, int response) ...@@ -1483,8 +1461,8 @@ visorbus_device_destroy_response(struct visor_device *dev_info, int response)
dev_info->pending_msg_hdr = NULL; dev_info->pending_msg_hdr = NULL;
} }
void void visorbus_device_pause_response(struct visor_device *dev_info,
visorbus_device_pause_response(struct visor_device *dev_info, int response) int response)
{ {
device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE, device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE,
dev_info, response, dev_info, response,
...@@ -1494,8 +1472,8 @@ visorbus_device_pause_response(struct visor_device *dev_info, int response) ...@@ -1494,8 +1472,8 @@ visorbus_device_pause_response(struct visor_device *dev_info, int response)
dev_info->pending_msg_hdr = NULL; dev_info->pending_msg_hdr = NULL;
} }
void void visorbus_device_resume_response(struct visor_device *dev_info,
visorbus_device_resume_response(struct visor_device *dev_info, int response) int response)
{ {
device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE, device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE,
dev_info, response, dev_info, response,
...@@ -1505,8 +1483,8 @@ visorbus_device_resume_response(struct visor_device *dev_info, int response) ...@@ -1505,8 +1483,8 @@ visorbus_device_resume_response(struct visor_device *dev_info, int response)
dev_info->pending_msg_hdr = NULL; dev_info->pending_msg_hdr = NULL;
} }
static struct parser_context * static struct parser_context *parser_init_byte_stream(u64 addr, u32 bytes,
parser_init_byte_stream(u64 addr, u32 bytes, bool *retry) bool *retry)
{ {
int allocbytes = sizeof(struct parser_context) + bytes; int allocbytes = sizeof(struct parser_context) + bytes;
struct parser_context *ctx; struct parser_context *ctx;
...@@ -1563,8 +1541,7 @@ parser_init_byte_stream(u64 addr, u32 bytes, bool *retry) ...@@ -1563,8 +1541,7 @@ parser_init_byte_stream(u64 addr, u32 bytes, bool *retry)
* which to copy out controlvm payload data. * which to copy out controlvm payload data.
* < 0 - error: ControlVM message was processed but an error occurred. * < 0 - error: ControlVM message was processed but an error occurred.
*/ */
static int static int handle_command(struct controlvm_message inmsg, u64 channel_addr)
handle_command(struct controlvm_message inmsg, u64 channel_addr)
{ {
struct controlvm_message_packet *cmd = &inmsg.cmd; struct controlvm_message_packet *cmd = &inmsg.cmd;
u64 parm_addr; u64 parm_addr;
...@@ -1665,8 +1642,7 @@ handle_command(struct controlvm_message inmsg, u64 channel_addr) ...@@ -1665,8 +1642,7 @@ handle_command(struct controlvm_message inmsg, u64 channel_addr)
* *
* Return: 0 if valid message was retrieved or -error * Return: 0 if valid message was retrieved or -error
*/ */
static int static int read_controlvm_event(struct controlvm_message *msg)
read_controlvm_event(struct controlvm_message *msg)
{ {
int err = visorchannel_signalremove(chipset_dev->controlvm_channel, int err = visorchannel_signalremove(chipset_dev->controlvm_channel,
CONTROLVM_QUEUE_EVENT, msg); CONTROLVM_QUEUE_EVENT, msg);
...@@ -1684,8 +1660,7 @@ read_controlvm_event(struct controlvm_message *msg) ...@@ -1684,8 +1660,7 @@ read_controlvm_event(struct controlvm_message *msg)
* parahotplug_process_list() - remove any request from the list that's been on * parahotplug_process_list() - remove any request from the list that's been on
* there too long and respond with an error * there too long and respond with an error
*/ */
static void static void parahotplug_process_list(void)
parahotplug_process_list(void)
{ {
struct list_head *pos; struct list_head *pos;
struct list_head *tmp; struct list_head *tmp;
...@@ -1711,8 +1686,7 @@ parahotplug_process_list(void) ...@@ -1711,8 +1686,7 @@ parahotplug_process_list(void)
spin_unlock(&parahotplug_request_list_lock); spin_unlock(&parahotplug_request_list_lock);
} }
static void static void controlvm_periodic_work(struct work_struct *work)
controlvm_periodic_work(struct work_struct *work)
{ {
struct controlvm_message inmsg; struct controlvm_message inmsg;
int count = 0; int count = 0;
...@@ -1786,8 +1760,7 @@ controlvm_periodic_work(struct work_struct *work) ...@@ -1786,8 +1760,7 @@ controlvm_periodic_work(struct work_struct *work)
chipset_dev->poll_jiffies); chipset_dev->poll_jiffies);
} }
static int static int visorchipset_init(struct acpi_device *acpi_device)
visorchipset_init(struct acpi_device *acpi_device)
{ {
int err = -ENODEV; int err = -ENODEV;
u64 addr; u64 addr;
...@@ -1861,8 +1834,7 @@ visorchipset_init(struct acpi_device *acpi_device) ...@@ -1861,8 +1834,7 @@ visorchipset_init(struct acpi_device *acpi_device)
return err; return err;
} }
static int static int visorchipset_exit(struct acpi_device *acpi_device)
visorchipset_exit(struct acpi_device *acpi_device)
{ {
visorbus_exit(); visorbus_exit();
cancel_delayed_work_sync(&chipset_dev->periodic_controlvm_work); cancel_delayed_work_sync(&chipset_dev->periodic_controlvm_work);
......
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