summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorNishka Dasgupta <nishkadg.linux@gmail.com>2019-07-08 12:11:43 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-22 07:34:10 +0200
commit8826a1985f96d402a66e25fe6eab09144b4d8003 (patch)
treed55ec204714a69d512c117f146f07703102107ab /drivers
parentd327ace0f301c6c203c0ed1aa5da823ab6fef5f6 (diff)
staging: most: dim2: Replace function dim_norm_ctrl_async_buffer_size()
Remove function dim_norm_ctrl_async_buffer_size as it does nothing except call norm_ctrl_async_buffer_size. Rename norm_ctrl_async_buffer_size to dim_norm_ctrl_async_buffer_size to maintain compatibility with call sites of the latter. Change type of new dim_norm_ctrl_async_buffer_size from static inline to non-static to match the old version. Modify only remaining call site of norm_ctrl_async_buffer_size to call dim_norm_ctrl_async_buffer_size instead. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190708064145.3250-1-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/most/dim2/hal.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/staging/most/dim2/hal.c b/drivers/staging/most/dim2/hal.c
index 699e02f83bd4..d4d532e76147 100644
--- a/drivers/staging/most/dim2/hal.c
+++ b/drivers/staging/most/dim2/hal.c
@@ -471,7 +471,7 @@ static inline bool check_bytes_per_frame(u32 bytes_per_frame)
return true;
}
-static inline u16 norm_ctrl_async_buffer_size(u16 buf_size)
+u16 dim_norm_ctrl_async_buffer_size(u16 buf_size)
{
u16 const max_size = (u16)ADT1_CTRL_ASYNC_BD_MASK + 1u;
@@ -652,7 +652,7 @@ static bool channel_start(struct dim_channel *ch, u32 buf_addr, u16 buf_size)
return dim_on_error(DIM_ERR_BAD_BUFFER_SIZE, "Bad buffer size");
if (ch->packet_length == 0 && ch->bytes_per_frame == 0 &&
- buf_size != norm_ctrl_async_buffer_size(buf_size))
+ buf_size != dim_norm_ctrl_async_buffer_size(buf_size))
return dim_on_error(DIM_ERR_BAD_BUFFER_SIZE,
"Bad control/async buffer size");
@@ -780,11 +780,6 @@ void dim_service_mlb_int_irq(void)
dimcb_io_write(&g.dim2->MS1, 0);
}
-u16 dim_norm_ctrl_async_buffer_size(u16 buf_size)
-{
- return norm_ctrl_async_buffer_size(buf_size);
-}
-
/**
* Retrieves maximal possible correct buffer size for isochronous data type
* conform to given packet length and not bigger than given buffer size.