scsi: pmcraid: use correct size unit when calling find_first_zero_bit()
authorNiklas Cassel <niklas.cassel@axis.com>
Thu, 16 Nov 2017 17:38:06 +0000 (18:38 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 8 Dec 2017 02:22:37 +0000 (21:22 -0500)
find_first_zero_bit()'s parameter 'size' is defined in bits, not in
bytes.

Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pmcraid.c

index e58be98430b014a40e1cd5eeba5472a39fe7419f..201c8de1853db9a90b7dcafcd8484ecf0138cdb6 100644 (file)
@@ -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;
 }