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

Configure Feed

Select the types of activity you want to include in your feed.

scsi: hpsa: Simplify {clear|set}_bit() parameters

{clear|set}_bit() can take an almost arbitrarily large bit number, so there
is no need to manually compute addresses. This is just redundant.

Link: https://lore.kernel.org/r/c3429a22023f58e5e5cc65d6cd7e83fb2bd9b870.1658340442.git.christophe.jaillet@wanadoo.fr
Tested-by: Don Brace <don.brace@microchip.com>
Acked-by: Don Brace <don.brace@microchip.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Christophe JAILLET and committed by
Martin K. Petersen
e95b305a 5afdd990

+2 -4
+2 -4
drivers/scsi/hpsa.c
··· 6233 6233 offset = (i + 1) % HPSA_NRESERVED_CMDS; 6234 6234 continue; 6235 6235 } 6236 - set_bit(i & (BITS_PER_LONG - 1), 6237 - h->cmd_pool_bits + (i / BITS_PER_LONG)); 6236 + set_bit(i, h->cmd_pool_bits); 6238 6237 break; /* it's ours now. */ 6239 6238 } 6240 6239 hpsa_cmd_partial_init(h, i, c); ··· 6260 6261 int i; 6261 6262 6262 6263 i = c - h->cmd_pool; 6263 - clear_bit(i & (BITS_PER_LONG - 1), 6264 - h->cmd_pool_bits + (i / BITS_PER_LONG)); 6264 + clear_bit(i, h->cmd_pool_bits); 6265 6265 } 6266 6266 } 6267 6267