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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 07, 2025 at 09:18:45PM +0100, Kees Bakker wrote:
> 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)
>

You are obviously right on this one too. I'll look into this one more
carefully and I'll send a v2. 

Regards,

Gaston




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux