diff mbox

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

Message ID 20171116173806.18378-1-niklas.cassel@axis.com (mailing list archive)
State Accepted
Headers show

Commit Message

Niklas Cassel Nov. 16, 2017, 5:38 p.m. UTC
find_first_zero_bit()'s parameter 'size' is defined in bits,
not in bytes.

Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
---
 drivers/scsi/pmcraid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin K. Petersen Dec. 8, 2017, 2:22 a.m. UTC | #1
Niklas,

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

Applied to 4.16/scsi-queue, thanks!
diff mbox

Patch

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index 4f9f115fb6a0..04ce838546f4 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -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;
 }