[PATCH 16/20] misc: genwqe: card_base: Remove set but unused variable 'rc'
haver
haver at linux.vnet.ibm.com
Tue Jun 30 03:17:35 EDT 2020
On 2020-06-29 16:04, Lee Jones wrote:
> Variable 'rc' hasn't been checked since the driver's inception
> in 2013. If it hasn't caused any issues since then, it's unlikely
> to in the future. Let's take it out for now.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/misc/genwqe/card_base.c: In function
> ‘genwqe_health_check_stop’:
>
> /home/lee/projects/linux/kernel/drivers/misc/genwqe/card_base.c:1046:6:
> warning: variable ‘rc’ set but not used
> [-Wunused-but-set-variable]
> 1046 | int rc;
> | ^~
>
> Cc: Michael Jung <mijung at gmx.net>
> Cc: Michael Ruettger <michael at ibmra.de>
> Cc: Frank Haverkamp <haver at linux.ibm.com>
> Cc: Joerg-Stephan Vogt <jsvogt at de.ibm.com>
> Signed-off-by: Lee Jones <lee.jones at linaro.org>
> ---
> drivers/misc/genwqe/card_base.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/misc/genwqe/card_base.c
> b/drivers/misc/genwqe/card_base.c
> index 1dc6c7c5cbce9..bceebf49de2d5 100644
> --- a/drivers/misc/genwqe/card_base.c
> +++ b/drivers/misc/genwqe/card_base.c
> @@ -1043,12 +1043,10 @@ static int genwqe_health_thread_running(struct
> genwqe_dev *cd)
>
> static int genwqe_health_check_stop(struct genwqe_dev *cd)
> {
> - int rc;
> -
> if (!genwqe_health_thread_running(cd))
> return -EIO;
>
> - rc = kthread_stop(cd->health_thread);
> + kthread_stop(cd->health_thread);
> cd->health_thread = NULL;
> return 0;
> }
Good idea. Let's remove it Thanks for the contribution.
Signed-off-by: Frank Haverkamp <haver at linux.ibm.com>
More information about the linux-arm-kernel
mailing list