Skip to content

Commit 786c87c

Browse files
YuKuai-huaweirafaeljw
authored andcommitted
PNP: isapnp: remove defined but not used function 'isapnp_checksum'
Fix gcc '-Wunused-function' warnning: drivers/pnp/isapnp/core.c:752:29: warning: 'isapnp_checksum' defined but not used [-Wunused-function] 752 | static unsigned char __init isapnp_checksum(unsigned char *data) Commit 04c589f ("PNP: isapnp: remove set but not used variable 'checksum'") removes the last caller of the function. It is never used and so can be removed. Fixes: 04c589f ("PNP: isapnp: remove set but not used variable 'checksum'") Signed-off-by: yu kuai <yukuai3@huawei.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 04c589f commit 786c87c

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

‎drivers/pnp/isapnp/core.c‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -746,28 +746,6 @@ static void __init isapnp_parse_resource_map(struct pnp_card *card)
746746
}
747747
}
748748

749-
/*
750-
* Compute ISA PnP checksum for first eight bytes.
751-
*/
752-
static unsigned char __init isapnp_checksum(unsigned char *data)
753-
{
754-
int i, j;
755-
unsigned char checksum = 0x6a, bit, b;
756-
757-
for (i = 0; i < 8; i++) {
758-
b = data[i];
759-
for (j = 0; j < 8; j++) {
760-
bit = 0;
761-
if (b & (1 << j))
762-
bit = 1;
763-
checksum =
764-
((((checksum ^ (checksum >> 1)) & 0x01) ^ bit) << 7)
765-
| (checksum >> 1);
766-
}
767-
}
768-
return checksum;
769-
}
770-
771749
/*
772750
* Build device list for all present ISA PnP devices.
773751
*/

0 commit comments

Comments
 (0)