staging: unisys: visorbus: visorchannel.c: fix multi-line function definition

Fixed incorrect function definition style in visorbus/visorchannel.c
by placing the function names on the same line as the return.

Signed-off-by: Charles Daniels <cdaniels@fastmail.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: David Binder <david.binder@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Charles Daniels 2017-07-17 16:17:18 -04:00 committed by Greg Kroah-Hartman
parent 7cfcd38125
commit f230ba68de
1 changed files with 44 additions and 57 deletions

View File

@ -54,8 +54,7 @@ struct visorchannel {
uuid_le inst; uuid_le inst;
}; };
void void visorchannel_destroy(struct visorchannel *channel)
visorchannel_destroy(struct visorchannel *channel)
{ {
if (!channel) if (!channel)
return; return;
@ -67,46 +66,39 @@ visorchannel_destroy(struct visorchannel *channel)
kfree(channel); kfree(channel);
} }
u64 u64 visorchannel_get_physaddr(struct visorchannel *channel)
visorchannel_get_physaddr(struct visorchannel *channel)
{ {
return channel->physaddr; return channel->physaddr;
} }
ulong ulong visorchannel_get_nbytes(struct visorchannel *channel)
visorchannel_get_nbytes(struct visorchannel *channel)
{ {
return channel->nbytes; return channel->nbytes;
} }
char * char *visorchannel_uuid_id(uuid_le *guid, char *s)
visorchannel_uuid_id(uuid_le *guid, char *s)
{ {
sprintf(s, "%pUL", guid); sprintf(s, "%pUL", guid);
return s; return s;
} }
char * char *visorchannel_id(struct visorchannel *channel, char *s)
visorchannel_id(struct visorchannel *channel, char *s)
{ {
return visorchannel_uuid_id(&channel->guid, s); return visorchannel_uuid_id(&channel->guid, s);
} }
char * char *visorchannel_zoneid(struct visorchannel *channel, char *s)
visorchannel_zoneid(struct visorchannel *channel, char *s)
{ {
return visorchannel_uuid_id(&channel->chan_hdr.zone_uuid, s); return visorchannel_uuid_id(&channel->chan_hdr.zone_uuid, s);
} }
u64 u64 visorchannel_get_clientpartition(struct visorchannel *channel)
visorchannel_get_clientpartition(struct visorchannel *channel)
{ {
return channel->chan_hdr.partition_handle; return channel->chan_hdr.partition_handle;
} }
int int visorchannel_set_clientpartition(struct visorchannel *channel,
visorchannel_set_clientpartition(struct visorchannel *channel, u64 partition_handle)
u64 partition_handle)
{ {
channel->chan_hdr.partition_handle = partition_handle; channel->chan_hdr.partition_handle = partition_handle;
return 0; return 0;
@ -118,16 +110,14 @@ visorchannel_set_clientpartition(struct visorchannel *channel,
* *
* Return: the UUID of the provided channel * Return: the UUID of the provided channel
*/ */
uuid_le uuid_le visorchannel_get_uuid(struct visorchannel *channel)
visorchannel_get_uuid(struct visorchannel *channel)
{ {
return channel->guid; return channel->guid;
} }
EXPORT_SYMBOL_GPL(visorchannel_get_uuid); EXPORT_SYMBOL_GPL(visorchannel_get_uuid);
int int visorchannel_read(struct visorchannel *channel, ulong offset, void *dest,
visorchannel_read(struct visorchannel *channel, ulong offset, ulong nbytes)
void *dest, ulong nbytes)
{ {
if (offset + nbytes > channel->nbytes) if (offset + nbytes > channel->nbytes)
return -EIO; return -EIO;
@ -137,9 +127,8 @@ visorchannel_read(struct visorchannel *channel, ulong offset,
return 0; return 0;
} }
int int visorchannel_write(struct visorchannel *channel, ulong offset, void *dest,
visorchannel_write(struct visorchannel *channel, ulong offset, ulong nbytes)
void *dest, ulong nbytes)
{ {
size_t chdr_size = sizeof(struct channel_header); size_t chdr_size = sizeof(struct channel_header);
size_t copy_size; size_t copy_size;
@ -158,8 +147,7 @@ visorchannel_write(struct visorchannel *channel, ulong offset,
return 0; return 0;
} }
void * void *visorchannel_get_header(struct visorchannel *channel)
visorchannel_get_header(struct visorchannel *channel)
{ {
return &channel->chan_hdr; return &channel->chan_hdr;
} }
@ -191,9 +179,8 @@ visorchannel_get_header(struct visorchannel *channel)
&((sig_hdr)->FIELD), \ &((sig_hdr)->FIELD), \
sizeof((sig_hdr)->FIELD)) sizeof((sig_hdr)->FIELD))
static int static int sig_read_header(struct visorchannel *channel, u32 queue,
sig_read_header(struct visorchannel *channel, u32 queue, struct signal_queue_header *sig_hdr)
struct signal_queue_header *sig_hdr)
{ {
if (channel->chan_hdr.ch_space_offset < sizeof(struct channel_header)) if (channel->chan_hdr.ch_space_offset < sizeof(struct channel_header))
return -EINVAL; return -EINVAL;
@ -204,9 +191,9 @@ sig_read_header(struct visorchannel *channel, u32 queue,
sig_hdr, sizeof(struct signal_queue_header)); sig_hdr, sizeof(struct signal_queue_header));
} }
static int static int sig_read_data(struct visorchannel *channel, u32 queue,
sig_read_data(struct visorchannel *channel, u32 queue, struct signal_queue_header *sig_hdr, u32 slot,
struct signal_queue_header *sig_hdr, u32 slot, void *data) void *data)
{ {
int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue, int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue,
sig_hdr, slot); sig_hdr, slot);
@ -215,9 +202,9 @@ sig_read_data(struct visorchannel *channel, u32 queue,
data, sig_hdr->signal_size); data, sig_hdr->signal_size);
} }
static int static int sig_write_data(struct visorchannel *channel, u32 queue,
sig_write_data(struct visorchannel *channel, u32 queue, struct signal_queue_header *sig_hdr, u32 slot,
struct signal_queue_header *sig_hdr, u32 slot, void *data) void *data)
{ {
int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue, int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue,
sig_hdr, slot); sig_hdr, slot);
@ -226,8 +213,8 @@ sig_write_data(struct visorchannel *channel, u32 queue,
data, sig_hdr->signal_size); data, sig_hdr->signal_size);
} }
static int static int signalremove_inner(struct visorchannel *channel, u32 queue,
signalremove_inner(struct visorchannel *channel, u32 queue, void *msg) void *msg)
{ {
struct signal_queue_header sig_hdr; struct signal_queue_header sig_hdr;
int error; int error;
@ -273,8 +260,8 @@ signalremove_inner(struct visorchannel *channel, u32 queue, void *msg)
* *
* Return: integer error code indicating the status of the removal * Return: integer error code indicating the status of the removal
*/ */
int int visorchannel_signalremove(struct visorchannel *channel, u32 queue,
visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg) void *msg)
{ {
int rc; int rc;
unsigned long flags; unsigned long flags;
@ -291,8 +278,7 @@ visorchannel_signalremove(struct visorchannel *channel, u32 queue, void *msg)
} }
EXPORT_SYMBOL_GPL(visorchannel_signalremove); EXPORT_SYMBOL_GPL(visorchannel_signalremove);
static bool static bool queue_empty(struct visorchannel *channel, u32 queue)
queue_empty(struct visorchannel *channel, u32 queue)
{ {
struct signal_queue_header sig_hdr; struct signal_queue_header sig_hdr;
@ -311,8 +297,7 @@ queue_empty(struct visorchannel *channel, u32 queue)
* Return: boolean indicating whether any messages in the designated * Return: boolean indicating whether any messages in the designated
* channel/queue are present * channel/queue are present
*/ */
bool bool visorchannel_signalempty(struct visorchannel *channel, u32 queue)
visorchannel_signalempty(struct visorchannel *channel, u32 queue)
{ {
bool rc; bool rc;
unsigned long flags; unsigned long flags;
@ -328,8 +313,8 @@ visorchannel_signalempty(struct visorchannel *channel, u32 queue)
} }
EXPORT_SYMBOL_GPL(visorchannel_signalempty); EXPORT_SYMBOL_GPL(visorchannel_signalempty);
static int static int signalinsert_inner(struct visorchannel *channel, u32 queue,
signalinsert_inner(struct visorchannel *channel, u32 queue, void *msg) void *msg)
{ {
struct signal_queue_header sig_hdr; struct signal_queue_header sig_hdr;
int err; int err;
@ -392,9 +377,11 @@ signalinsert_inner(struct visorchannel *channel, u32 queue, void *msg)
* Return: pointer to visorchannel that was created if successful, * Return: pointer to visorchannel that was created if successful,
* otherwise NULL * otherwise NULL
*/ */
static struct visorchannel * static struct visorchannel *visorchannel_create_guts(
visorchannel_create_guts(u64 physaddr, unsigned long channel_bytes, u64 physaddr,
gfp_t gfp, uuid_le guid, bool needs_lock) unsigned long channel_bytes,
gfp_t gfp, uuid_le guid,
bool needs_lock)
{ {
struct visorchannel *channel; struct visorchannel *channel;
int err; int err;
@ -469,17 +456,17 @@ visorchannel_create_guts(u64 physaddr, unsigned long channel_bytes,
return NULL; return NULL;
} }
struct visorchannel * struct visorchannel *visorchannel_create(u64 physaddr,
visorchannel_create(u64 physaddr, unsigned long channel_bytes, unsigned long channel_bytes,
gfp_t gfp, uuid_le guid) gfp_t gfp, uuid_le guid)
{ {
return visorchannel_create_guts(physaddr, channel_bytes, gfp, guid, return visorchannel_create_guts(physaddr, channel_bytes, gfp, guid,
false); false);
} }
struct visorchannel * struct visorchannel *visorchannel_create_with_lock(u64 physaddr,
visorchannel_create_with_lock(u64 physaddr, unsigned long channel_bytes, unsigned long channel_bytes,
gfp_t gfp, uuid_le guid) gfp_t gfp, uuid_le guid)
{ {
return visorchannel_create_guts(physaddr, channel_bytes, gfp, guid, return visorchannel_create_guts(physaddr, channel_bytes, gfp, guid,
true); true);
@ -494,8 +481,8 @@ visorchannel_create_with_lock(u64 physaddr, unsigned long channel_bytes,
* *
* Return: integer error code indicating the status of the insertion * Return: integer error code indicating the status of the insertion
*/ */
int int visorchannel_signalinsert(struct visorchannel *channel, u32 queue,
visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg) void *msg)
{ {
int rc; int rc;
unsigned long flags; unsigned long flags;