Skip to content

Commit

Permalink
edac: phytium_edac: Convert to platform remove callback returning void
Browse files Browse the repository at this point in the history
0edb555: platform: Make platform_driver::remove() return void
cause build error, so convert .remove from int to void

Log:
drivers/edac/phytium_edac.c:470:19: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Werror=incompatible-pointer-types]
  470 |         .remove = phytium_edac_remove,
      |                   ^~~~~~~~~~~~~~~~~~~
drivers/edac/phytium_edac.c:470:19: note: (near initialization for ‘phytium_edac_driver.<anonymous>.remove’)
  • Loading branch information
opsiff authored Nov 13, 2024
1 parent e29165c commit a25866e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/edac/phytium_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,13 +450,11 @@ static int phytium_edac_probe(struct platform_device *pdev)
return ret;
}

static int phytium_edac_remove(struct platform_device *pdev)
static void phytium_edac_remove(struct platform_device *pdev)
{
struct phytium_edac *edac = dev_get_drvdata(&pdev->dev);

phytium_edac_device_remove(edac);

return 0;
}

static const struct of_device_id phytium_edac_of_match[] = {
Expand Down

0 comments on commit a25866e

Please sign in to comment.