Skip to content

Commit

Permalink
perf: phytium_pcie_pmu: Convert to platform remove callback returning…
Browse files Browse the repository at this point in the history
… void

0edb555: platform: Make platform_driver::remove() return void
cause build error, so convert .remove from int to void

Log:
drivers/perf/phytium/phytium_pcie_pmu.c:811:19: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Werror=incompatible-pointer-types]
  811 |         .remove = phytium_pcie_pmu_remove,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~
drivers/perf/phytium/phytium_pcie_pmu.c:811:19: note: (near initialization for ‘phytium_pcie_pmu_driver.<anonymous>.remove’)
  • Loading branch information
opsiff authored Nov 13, 2024
1 parent e29165c commit 81dcfaa
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/perf/phytium/phytium_pcie_pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ static int phytium_pcie_pmu_probe(struct platform_device *pdev)
return ret;
}

static int phytium_pcie_pmu_remove(struct platform_device *pdev)
static void phytium_pcie_pmu_remove(struct platform_device *pdev)
{
struct phytium_pcie_pmu *pcie_pmu = platform_get_drvdata(pdev);

Expand All @@ -797,8 +797,6 @@ static int phytium_pcie_pmu_remove(struct platform_device *pdev)
perf_pmu_unregister(&pcie_pmu->pmu);
cpuhp_state_remove_instance_nocalls(
phytium_pcie_pmu_hp_state, &pcie_pmu->node);

return 0;
}

static struct platform_driver phytium_pcie_pmu_driver = {
Expand Down

0 comments on commit 81dcfaa

Please sign in to comment.