mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 20:46:48 +02:00
staging: gpib: ni_usb: remove unused variable
Remove unused variable 'adr1_bits' in function 'parse_board_ibrd_readback' Since the value of the variable 'i' is increased when 'adr1_bits' is set, the 'i++' post-increment was added in order to keep the value of 'i' right. This change removes the following warning: warning: variable ‘adr1_bits’ 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-7-gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c725363401
commit
a990ae96e6
|
|
@ -426,7 +426,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;
|
||||
|
|
@ -459,7 +458,7 @@ static int parse_board_ibrd_readback(const u8 *raw_data, struct ni_usb_status_bl
|
|||
pr_err("bug: status->id=%i, != ibrd_status_id\n", status->id);
|
||||
return -EIO;
|
||||
}
|
||||
adr1_bits = raw_data[i++];
|
||||
i++;
|
||||
if (num_data_blocks) {
|
||||
*actual_bytes_read = (num_data_blocks - 1) * data_block_length + raw_data[i++];
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user