aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pylypiv <[email protected]>2021-11-01 16:28:25 -0700
committerMartin K. Petersen <[email protected]>2021-11-18 22:26:58 -0500
commit853615582d6f99c0a4b4424a63b4f01aa8fcebef (patch)
tree5d76e94252d965cf7e8e6537dad00d2286a87c5a
parent606c54ae975ad3af540b505b46b55a687501711f (diff)
scsi: pm80xx: Use bitmap_zalloc() for tags bitmap allocation
We used to allocate X bytes while we only need X bits. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Vishakha Channapattan <[email protected]> Acked-by: Jack Wang <[email protected]> Signed-off-by: Igor Pylypiv <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/scsi/pm8001/pm8001_init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index bed8cc125544..7ffd39214263 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -179,7 +179,7 @@ static void pm8001_free(struct pm8001_hba_info *pm8001_ha)
}
PM8001_CHIP_DISP->chip_iounmap(pm8001_ha);
flush_workqueue(pm8001_wq);
- kfree(pm8001_ha->tags);
+ bitmap_free(pm8001_ha->tags);
kfree(pm8001_ha);
}
@@ -1194,7 +1194,7 @@ pm8001_init_ccb_tag(struct pm8001_hba_info *pm8001_ha, struct Scsi_Host *shost,
can_queue = ccb_count - PM8001_RESERVE_SLOT;
shost->can_queue = can_queue;
- pm8001_ha->tags = kzalloc(ccb_count, GFP_KERNEL);
+ pm8001_ha->tags = bitmap_zalloc(ccb_count, GFP_KERNEL);
if (!pm8001_ha->tags)
goto err_out;