PNP updates for 5.6-rc1

Get rid of unused variable and function (yu kuai).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAl4u27wSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxRTQP/jxTn3pJc+0kCo9CBJ9UGBmGF/qzwPsj
 vV1ETlMlonT6xB1tXBQ1sJt9X7Y5AELcciKZ2znHSI0KjoyIu4K6dyLP9fdIh3kI
 xLFrKyBYKqOdJ44u2aVRME+thdwca3uziVx81c65ecSG/Y7cDYrXE8g2SSCGxHMb
 yKpghJ88Oj5R3XX2AS60zIL+N35ML6j4SATBoRvetBCBMMUKh4ILIMZSz9hHtoQ/
 dln0icrB4ueeGb5SQnNGojt5TtW4BKEOsfyR7Ez1LSOPx1GwP4aV00XHyx/kkr0L
 sWXqLEKFZOBYh44/mZITlHnR8LunTf/wXaR1kPxcE3EWVF0RtxmE0GRwP2S5uiu/
 LFuOa8ICW9k1q7K7NhrxTYTzfXRVcLjXxHg/79gmMZNN1ODVKEm8Y8MBo8KQtd8/
 iuSqH77QYd0brrW39cGg9NLeKMsIQkYN281q0+AS7vQ705iSABlENXqzBEibGhJf
 9OgjDwd7eRBTdFUJgyF4cVTq6GOYxslOdB5ZWkpqNuObEPb7m+EQu/8g018y3zuJ
 A983pk2m1GcIfultV9BEzp5GsQ6oYQjBUxkzZ4kaYkXqUZXC1P1rAp1qjqmCJ0x2
 N+Mi3ui7M4w/qMwjeS3JWOpHaO54abLF7h0kWYybIm/p/44UNBkfu6a4DPTDt1oR
 okJ6WZy/0wzq
 =KVOs
 -----END PGP SIGNATURE-----

Merge tag 'pnp-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull PNP updates from Rafael Wysocki:
 "Get rid of unused variable and function (yu kuai)"

* tag 'pnp-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PNP: isapnp: remove defined but not used function 'isapnp_checksum'
  PNP: isapnp: remove set but not used variable 'checksum'
This commit is contained in:
Linus Torvalds 2020-01-27 12:04:48 -08:00
commit 34dabd8116
1 changed files with 1 additions and 24 deletions

View File

@ -746,35 +746,13 @@ __skip:
}
}
/*
* Compute ISA PnP checksum for first eight bytes.
*/
static unsigned char __init isapnp_checksum(unsigned char *data)
{
int i, j;
unsigned char checksum = 0x6a, bit, b;
for (i = 0; i < 8; i++) {
b = data[i];
for (j = 0; j < 8; j++) {
bit = 0;
if (b & (1 << j))
bit = 1;
checksum =
((((checksum ^ (checksum >> 1)) & 0x01) ^ bit) << 7)
| (checksum >> 1);
}
}
return checksum;
}
/*
* Build device list for all present ISA PnP devices.
*/
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];
@ -784,7 +762,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);