Skip to content

Commit

Permalink
PNP: isapnp: remove set but not used variable 'checksum'
Browse files Browse the repository at this point in the history
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/pnp/isapnp/core.c: In function ‘isapnp_build_device_list’:
drivers/pnp/isapnp/core.c:777:27: warning: variable ‘checksum’ set
but not used [-Wunused-but-set-variable]

It is never used, and so can be removed.

Signed-off-by: yu kuai <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
YuKuai-huawei authored and rafaeljw committed Jan 15, 2020
1 parent b3a987b commit 04c589f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/pnp/isapnp/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ static unsigned char __init isapnp_checksum(unsigned char *data)
static int __init isapnp_build_device_list(void)
{
int csn;
unsigned char header[9], checksum;
unsigned char header[9];
struct pnp_card *card;
u32 eisa_id;
char id[8];
Expand All @@ -784,7 +784,6 @@ static int __init isapnp_build_device_list(void)
for (csn = 1; csn <= isapnp_csn_count; csn++) {
isapnp_wake(csn);
isapnp_peek(header, 9);
checksum = isapnp_checksum(header);
eisa_id = header[0] | header[1] << 8 |
header[2] << 16 | header[3] << 24;
pnp_eisa_id_to_string(eisa_id, id);
Expand Down

0 comments on commit 04c589f

Please sign in to comment.