Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drivers/perf: Remove usage of the deprecated ida_simple_xx() API

ida_alloc() and ida_free() should be preferred to the deprecated
ida_simple_get() and ida_simple_remove().

This is less verbose.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/85b0b73a1b2f743dd5db15d4765c7685100de27f.1702230488.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Will Deacon <will@kernel.org>

authored by

Christophe JAILLET and committed by
Will Deacon
79c03ed4 46fe448e

+3 -3
+3 -3
drivers/perf/fsl_imx9_ddr_perf.c
··· 617 617 618 618 platform_set_drvdata(pdev, pmu); 619 619 620 - pmu->id = ida_simple_get(&ddr_ida, 0, 0, GFP_KERNEL); 620 + pmu->id = ida_alloc(&ddr_ida, GFP_KERNEL); 621 621 name = devm_kasprintf(&pdev->dev, GFP_KERNEL, DDR_PERF_DEV_NAME "%d", pmu->id); 622 622 if (!name) { 623 623 ret = -ENOMEM; ··· 674 674 cpuhp_remove_multi_state(pmu->cpuhp_state); 675 675 cpuhp_state_err: 676 676 format_string_err: 677 - ida_simple_remove(&ddr_ida, pmu->id); 677 + ida_free(&ddr_ida, pmu->id); 678 678 dev_warn(&pdev->dev, "i.MX9 DDR Perf PMU failed (%d), disabled\n", ret); 679 679 return ret; 680 680 } ··· 688 688 689 689 perf_pmu_unregister(&pmu->pmu); 690 690 691 - ida_simple_remove(&ddr_ida, pmu->id); 691 + ida_free(&ddr_ida, pmu->id); 692 692 693 693 return 0; 694 694 }