[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3753eb61-e198-4f4c-97d8-4634c1b8165d@ijzerbout.nl>
Date: Fri, 7 Feb 2025 21:18:45 +0100
From: Kees Bakker <kees@...erbout.nl>
To: Gaston Gonzalez <gascoar@...il.com>, linux-staging@...ts.linux.dev
Cc: dpenkler@...il.com, gregkh@...uxfoundation.org, arnd@...db.de,
dan.carpenter@...cle.com, ajithpv.linux@...il.com, roheetchavan@...il.com,
niharchaithanya@...il.com, eleanor15x@...il.com, everestkc@...restkc.com.np,
skhan@...uxfoundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] staging: gpib: tnt4882: remove unused variable
Op 07-02-2025 om 16:04 schreef Gaston Gonzalez:
> Remove unused variable 'retval' in function 'tnt4882_update_status'
>
> This change removes the following warning:
>
> warning: variable ‘retval’ set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Gaston Gonzalez <gascoar@...il.com>
> ---
> drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
> index 2e1c3cbebaca..a681bf559b46 100644
> --- a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
> +++ b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
> @@ -704,12 +704,10 @@ static unsigned int tnt4882_update_status(gpib_board_t *board, unsigned int clea
> {
> unsigned long flags;
> u8 line_status;
> - unsigned int retval;
> struct tnt4882_priv *priv = board->private_data;
>
> spin_lock_irqsave(&board->spinlock, flags);
> board->status &= ~clear_mask;
> - retval = nec7210_update_status_nolock(board, &priv->nec7210_priv);
You cannot remove a function call just like that. At least, not without
describing that
it is OK to do so.
> /* set / clear SRQ state since it is not cleared by interrupt */
> line_status = tnt_readb(priv, BSR);
> if (line_status & BCSR_SRQ_BIT)
Powered by blists - more mailing lists