Re: [PATCH] staging: most: dim2: add missing Return: documentation

From: Dan Carpenter

Date: Thu Nov 05 2026 - 00:11:36 EST


On Wed, Nov 04, 2026 at 10:51:08PM +0200, Albu Victor-Marian wrote:
> Add missing Return: descriptions to functions in dim2.c.
>
> Signed-off-by: Albu Victor-Marian <albu.victor.m@xxxxxxxxx>
> ---
> drivers/staging/most/dim2/dim2.c | 30 ++++++++++++++++++++++++++----
> 1 file changed, 26 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
> index 0e2512d166329..7ed38d5d93f05 100644
> --- a/drivers/staging/most/dim2/dim2.c
> +++ b/drivers/staging/most/dim2/dim2.c
> @@ -156,6 +156,10 @@ void dimcb_on_error(u8 error_id, const char *error_message)
> * @hdm_ch: channel specific data
> *
> * Transfer a buffer from pending_list if the channel is ready
> + *
> + * Return: 0 on success, -EINVAL if hdm_ch is not initialized, -EAGAIN if hdm_ch pending_list is
> + * empty, dim_channel is not ready or there is not enough DBR space, -EFAULT if first MBO bus
> + * address is 0 or dim_channel fails to start

These line lengths are too long.

Normally we would just say 0 on success and negative error codes on
failure. Spelling them all out like this will be hard to keep in sync
with the code.

regards,
dan carpenter