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