[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200322112611.GB75383@kroah.com>
Date: Sun, 22 Mar 2020 12:26:11 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: "John B. Wyatt IV" <jbwyatt4@...il.com>
Cc: outreachy-kernel@...glegroups.com,
Julia Lawall <julia.lawall@...ia.fr>,
Forest Bond <forest@...ttletooquiet.net>,
Quentin Deslandes <quentin.deslandes@...ev.co.uk>,
Colin Ian King <colin.king@...onical.com>,
Malcolm Priestley <tvboxspy@...il.com>,
Oscar Carter <oscar.carter@....com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: vt6656: remove unneeded variable: ret
On Sun, Mar 22, 2020 at 02:23:03AM -0700, John B. Wyatt IV wrote:
> Remove unneeded variable ret; replace with 0 for the return value.
>
> Update function documentation (comment) on the return status as
> suggested by Julia Lawall <julia.lawall@...ia.fr>.
>
> Issue reported by coccinelle (coccicheck).
>
> Signed-off-by: John B. Wyatt IV <jbwyatt4@...il.com>
> ---
> drivers/staging/vt6656/card.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
> index dc3ab10eb630..05b57a2489a0 100644
> --- a/drivers/staging/vt6656/card.c
> +++ b/drivers/staging/vt6656/card.c
> @@ -716,13 +716,11 @@ int vnt_radio_power_off(struct vnt_private *priv)
> * Out:
> * none
> *
> - * Return Value: true if success; otherwise false
> + * Return Value: 0
If this always returns something, why have it return anything at all?
Why not make this a patch series, doing this, and then fixing up the
callers and the function to not return anything.
thanks,
greg k-h
Powered by blists - more mailing lists