diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2016-08-21 08:28:25 (GMT) |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-08-31 02:22:52 (GMT) |
commit | 51f9039ffd751dee54fe26609df645bfd128b1d0 (patch) | |
tree | c954f7ab943546be5a309f298fa7c62bf181a68b /drivers/scsi/megaraid | |
parent | f8630bd7e2185d175f76b38b36609c45144e2d15 (diff) | |
download | linux-51f9039ffd751dee54fe26609df645bfd128b1d0.tar.xz |
scsi: megaraid_sas: Fix the search of first memory bar
The 2nd parameter of 'find_first_bit' is the number of bits to search.
In this case, we are passing 'sizeof(unsigned long)' which is likely to
be 4.
It is likely that the number of bits in a long was expected here, so use
BITS_PER_LONG instead.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index c87e5ef..7edc9e2 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -5036,7 +5036,7 @@ static int megasas_init_fw(struct megasas_instance *instance) /* Find first memory bar */ bar_list = pci_select_bars(instance->pdev, IORESOURCE_MEM); - instance->bar = find_first_bit(&bar_list, sizeof(unsigned long)); + instance->bar = find_first_bit(&bar_list, BITS_PER_LONG); if (pci_request_selected_regions(instance->pdev, instance->bar, "megasas: LSI")) { dev_printk(KERN_DEBUG, &instance->pdev->dev, "IO memory region busy!\n"); |