Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 04c589f35bc5 ("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: 04c589f35bc5 ("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>

authored by

yu kuai and committed by
Rafael J. Wysocki
786c87cd 04c589f3

-22
-22
drivers/pnp/isapnp/core.c
··· 747 747 } 748 748 749 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 - 771 - /* 772 750 * Build device list for all present ISA PnP devices. 773 751 */ 774 752 static int __init isapnp_build_device_list(void)