Subject: linux-next: build failure after merge of the spi tree

From: Stephen Rothwell <[email-masked]>
Date: Tue, 15 Feb 2022 13:08:58 +1100

Hi all,

After merging the spi tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/net/ethernet/davicom/dm9051.c:1253:19: error: initialization of 'void (*)(struct spi_device *)' from incompatible pointer type 'int (*)(struct spi_device *)' [-Werror=incompatible-pointer-types]
 1253 |         .remove = dm9051_drv_remove,
      |                   ^~~~~~~~~~~~~~~~~
drivers/net/ethernet/davicom/dm9051.c:1253:19: note: (near initialization for 'dm9051_driver.remove')

Caused by commit

  a0386bba7093 ("spi: make remove callback a void function")

interacting with commit

  2dc95a4d30ed ("net: Add dm9051 driver")

from the net-next tree.

I applied the following merge resolution and can carry it until the
trees are merged.

From: Stephen Rothwell <[email-masked]>
Date: Tue, 15 Feb 2022 13:05:41 +1100
Subject: [PATCH] fix up for "pi: make remove callback a void function"

Signed-off-by: Stephen Rothwell <[email-masked]>
---
 drivers/net/ethernet/davicom/dm9051.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/davicom/dm9051.c b/drivers/net/ethernet/davicom/dm9051.c
index cee3ff499fd4..d2513c97f83e 100644
--- a/drivers/net/ethernet/davicom/dm9051.c
+++ b/drivers/net/ethernet/davicom/dm9051.c
@@ -1223,15 +1223,13 @@ static int dm9051_probe(struct spi_device *spi)
 	return 0;
 }
 
-static int dm9051_drv_remove(struct spi_device *spi)
+static void dm9051_drv_remove(struct spi_device *spi)
 {
 	struct device *dev = &spi->dev;
 	struct net_device *ndev = dev_get_drvdata(dev);
 	struct board_info *db = to_dm9051_board(ndev);
 
 	phy_disconnect(db->phydev);
-
-	return 0;
 }
 
 static const struct of_device_id dm9051_match_table[] = {
-- 
2.34.1

-- 
Cheers,
Stephen Rothwell