Re: [PATCH 4/5] staging: gpib: tnt4882: remove unused variable

From: Kees Bakker
Date: Fri Feb 07 2025 - 15:19:03 EST


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@xxxxxxxxx>
---
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)