Skip to content

Commit

Permalink
char: ipmi: kcs_bmc_phytium: Convert to platform remove callback retu…
Browse files Browse the repository at this point in the history
…rning void

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

Log:
drivers/char/ipmi/kcs_bmc_phytium.c:431:19: error: initialization of ‘void (*)(struct platform_device *)’ from incompatible pointer type ‘int (*)(struct platform_device *)’ [-Werror=incompatible-pointer-types]
  431 |         .remove = phytium_kcs_remove,
      |                   ^~~~~~~~~~~~~~~~~~
drivers/char/ipmi/kcs_bmc_phytium.c:431:19: note: (near initialization for ‘phytium_kcs_bmc_driver.<anonymous>.remove’)
  • Loading branch information
opsiff authored and MingcongBai committed Nov 14, 2024
1 parent 92103b7 commit 400b57e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/char/ipmi/kcs_bmc_phytium.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ static int phytium_kcs_probe(struct platform_device *pdev)
return 0;
}

static int phytium_kcs_remove(struct platform_device *pdev)
static void phytium_kcs_remove(struct platform_device *pdev)
{
struct phytium_kcs_bmc *priv = platform_get_drvdata(pdev);
struct kcs_bmc_device *kcs_bmc = &priv->kcs_bmc;
Expand All @@ -413,7 +413,6 @@ static int phytium_kcs_remove(struct platform_device *pdev)
priv->obe.remove = true;
spin_unlock_irq(&priv->obe.lock);
del_timer_sync(&priv->obe.timer);
return 0;
}

static const struct of_device_id phytium_kcs_bmc_match[] = {
Expand Down

0 comments on commit 400b57e

Please sign in to comment.