[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tkq6c4e33nhct6lsxjqm4iwanefplvyvhqain3ofnctpbvx26p@royoj2icj4h7>
Date: Fri, 7 Feb 2025 18:07:56 -0300
From: Gaston Gonzalez <gascoar@...il.com>
To: Kees Bakker <kees@...erbout.nl>
Cc: linux-staging@...ts.linux.dev, 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 3/5] staging: gpib: ni_usb: remove unused variable
Hi Kees,
Thank you for the review.
On Fri, Feb 07, 2025 at 08:46:53PM +0100, Kees Bakker wrote:
> Op 07-02-2025 om 16:04 schreef Gaston Gonzalez:
> > Remove unused variable 'adr1_bits' in function 'parse_board_ibrd_readback'
> >
> > This change removes the following warning:
> >
> > warning: variable ‘adr1_bits’ set but not used [-Wunused-but-set-variable]
> >
> > Signed-off-by: Gaston Gonzalez <gascoar@...il.com>
> > ---
> > drivers/staging/gpib/ni_usb/ni_usb_gpib.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/staging/gpib/ni_usb/ni_usb_gpib.c b/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
> > index d0656dc520f5..b7f221def217 100644
> > --- a/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
> > +++ b/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
> > @@ -427,7 +427,6 @@ static int parse_board_ibrd_readback(const u8 *raw_data, struct ni_usb_status_bl
> > int i = 0;
> > int j = 0;
> > int k;
> > - unsigned int adr1_bits;
> > int num_data_blocks = 0;
> > struct ni_usb_status_block register_write_status;
> > int unexpected = 0;
> > @@ -460,7 +459,6 @@ static int parse_board_ibrd_readback(const u8 *raw_data, struct ni_usb_status_bl
> > pr_err("%s: bug: status->id=%i, != ibrd_status_id\n", __func__, status->id);
> > return -EIO;
> > }
> > - adr1_bits = raw_data[i++];
> Careful. You're removing the i++ as well.
Ok, you are right. I missed that.. I'll redo the patch.
> > if (num_data_blocks) {
> > *actual_bytes_read = (num_data_blocks - 1) * data_block_length + raw_data[i++];
> > } else {
>
regards,
Gaston
Powered by blists - more mailing lists