2017-11-16 21:50:48

by Niklas Cassel

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Niklas Cassel <[email protected]>
---
drivers/scsi/pmcraid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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;
}
--
2.14.2


From 1586203898755849192@xxx Fri Dec 08 08:31:58 +0000 2017
X-GM-THRID: 1586203898755849192
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread