Skip to contentSkip to conversation

scsi: pmcraid: use correct size unit when calling find_first_zero_bit()

PATCH Applied Niklas Cassel 2 participants 2 messages Nov 16, 2017 – Dec 8, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: pmcraid: use correct size unit when calling find_first_zero_bit()

find_first_zero_bit()'s parameter 'size' is defined in bits, not in bytes.

---
 drivers/scsi/pmcraid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/pmcraid.c +1 -1
index 4f9f115fb6a0..04ce838546f4 100644
@@ -5216,7 +5216,7 @@ static unsigned short pmcraid_get_minor(void)
 {
 	int minor;
 
-	minor = find_first_zero_bit(pmcraid_minor, sizeof(pmcraid_minor));
+	minor = find_first_zero_bit(pmcraid_minor, PMCRAID_MAX_ADAPTERS);
 	__set_bit(minor, pmcraid_minor);
 	return minor;
 }
Signature · 1 line
2.14.2
#1 lore raw

Niklas,

Quoted 2 lines

find_first_zero_bit()'s parameter 'size' is defined in bits, not in bytes.

Applied to 4.16/scsi-queue, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering