]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: gpib: tnt4882: remove unused variable
authorGaston Gonzalez <gascoar@gmail.com>
Fri, 14 Feb 2025 19:54:46 +0000 (16:54 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Feb 2025 15:51:34 +0000 (16:51 +0100)
Remove unused variable 'retval' in function 'tnt4882_update_status'.

A call to nec7210_update_status_nolock() is added as the status bits are written
to board->status in that function.

This change removes the following warning:

warning: variable ‘retval’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20250214195456.104075-9-gascoar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gpib/tnt4882/tnt4882_gpib.c

index 04e46554185c76ea70c8d473c909e0c492dc1be2..e1840f16a326bd06ffac72deea55e4f39e49e52b 100644 (file)
@@ -704,12 +704,11 @@ 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);
+       nec7210_update_status_nolock(board, &priv->nec7210_priv);
        /* set / clear SRQ state since it is not cleared by interrupt */
        line_status = tnt_readb(priv, BSR);
        if (line_status & BCSR_SRQ_BIT)