Commit 43a1965f authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Marc Zyngier
Browse files

irqchip/ls-scfg-msi: Switch to devm_bitmap_zalloc()



Switch to devm_bitmap_zalloc() to show clearly what we are allocating.
Besides that it returns pointer of bitmap type instead of opaque void *.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210618151657.65305-5-andriy.shevchenko@linux.intel.com
parent ff5fe886
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -362,10 +362,7 @@ static int ls_scfg_msi_probe(struct platform_device *pdev)


	msi_data->irqs_num = MSI_IRQS_PER_MSIR *
	msi_data->irqs_num = MSI_IRQS_PER_MSIR *
			     (1 << msi_data->cfg->ibs_shift);
			     (1 << msi_data->cfg->ibs_shift);
	msi_data->used = devm_kcalloc(&pdev->dev,
	msi_data->used = devm_bitmap_zalloc(&pdev->dev, msi_data->irqs_num, GFP_KERNEL);
				    BITS_TO_LONGS(msi_data->irqs_num),
				    sizeof(*msi_data->used),
				    GFP_KERNEL);
	if (!msi_data->used)
	if (!msi_data->used)
		return -ENOMEM;
		return -ENOMEM;
	/*
	/*