Re: linux-next: build failure after merge of the driver-core tree

Greg KH
2024-06-25T05:11:34Z

On Mon, Jun 24, 2024 at 07:23:36PM +0100, Mark Brown wrote:
> Hi all,
>
> After merging the driver-core tree, today's linux-next build
> (x86_64 allmodconfig) failed like this:
>
> /tmp/next/build/drivers/net/ethernet/renesas/rtsn.c:1381:27: error: initialization of 'void (*)(struct platform_device *)' from incompatible pointer type 'int (*)(struct platform_device *)' [-Werror=incompatible-pointer-types]
> 1381 | .remove = rtsn_remove,
> | ^~~~~~~~~~~
> /tmp/next/build/drivers/net/ethernet/renesas/rtsn.c:1381:27: note: (near initialization for 'rtsn_driver.<anonymous>.remove')
>
> Caused by commit
>
> 0edb555a65d1e ("platform: Make platform_driver::remove() return void")
>
> interacting with
>
> b0d3969d2b4db ("net: ethernet: rtsn: Add support for Renesas Ethernet-TSN")
>
> I have applied the below patch.
>
> From 8f276c3b5b1be09214cbd5643dd4fe4b2e6c692f Mon Sep 17 00:00:00 2001
> From: Mark Brown <broonie@kernel.org>
> Date: Mon, 24 Jun 2024 19:02:24 +0100
> Subject: [PATCH] net: ethernet: rtsn: Fix up for remove() coversion to return
> void
>
> Fixes: 0edb555a65d1e ("platform: Make platform_driver::remove() return void")
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
> drivers/net/ethernet/renesas/rtsn.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/renesas/rtsn.c b/drivers/net/ethernet/renesas/rtsn.c
> index ad69d47463cbd..5a6cc99e6b35a 100644
> --- a/drivers/net/ethernet/renesas/rtsn.c
> +++ b/drivers/net/ethernet/renesas/rtsn.c
> @@ -1358,7 +1358,7 @@ static int rtsn_probe(struct platform_device *pdev)
> return ret;
> }
>
> -static int rtsn_remove(struct platform_device *pdev)
> +static void rtsn_remove(struct platform_device *pdev)
> {
> struct rtsn_private *priv = platform_get_drvdata(pdev);
>
> @@ -1372,8 +1372,6 @@ static int rtsn_remove(struct platform_device *pdev)
> pm_runtime_disable(&pdev->dev);
>
> free_netdev(priv->ndev);
> -
> - return 0;
> }
>
> static struct platform_driver rtsn_driver = {
> --
> 2.39.2
>

Looks good, thanks!

greg k-h