All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] isa: Make the remove callback for isa drivers return void
@ 2021-01-21 20:48 ` Uwe Kleine-König
  0 siblings, 0 replies; 18+ messages in thread
From: Uwe Kleine-König @ 2021-01-21 20:48 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, William Breathitt Gray,
	Greg Kroah-Hartman, Rafael J. Wysocki, Pau Oliva Fora,
	Dmitry Torokhov, Mauro Carvalho Chehab, Wolfgang Grandegger,
	Marc Kleine-Budde, David S. Miller, Jakub Kicinski,
	Matthew Wilcox, Hannes Reinecke, James E.J. Bottomley,
	Martin K. Petersen, Finn Thain, Michael Schmitz, Jaroslav Kysela,
	Takashi Iwai
  Cc: linux-watchdog, linux-kernel, linux-i2c, linux-input,
	linux-media, linux-can, netdev, linux-scsi, alsa-devel

Hello,

as described in the commit log of the 2nd patch returning an error code
from a bus' remove callback doesn't make any difference as the driver
core ignores it and still considers the device removed.

So change the remove callback to return void to not give driver authors
an incentive to believe they could return an error.

There is only a single isa driver in the tree (assuming I didn't miss
any) that has a remove callback that can return a non zero return code.
This is "fixed" in the first patch, to make the second patch more
obviously correct.

Best regards
Uwe

Uwe Kleine-König (2):
  watchdog: pcwd: drop always-false if from remove callback
  isa: Make the remove callback for isa drivers return void

 drivers/base/isa.c                   | 2 +-
 drivers/i2c/busses/i2c-elektor.c     | 4 +---
 drivers/i2c/busses/i2c-pca-isa.c     | 4 +---
 drivers/input/touchscreen/htcpen.c   | 4 +---
 drivers/media/radio/radio-sf16fmr2.c | 4 +---
 drivers/net/can/sja1000/tscan1.c     | 4 +---
 drivers/net/ethernet/3com/3c509.c    | 3 +--
 drivers/scsi/advansys.c              | 3 +--
 drivers/scsi/aha1542.c               | 3 +--
 drivers/scsi/fdomain_isa.c           | 3 +--
 drivers/scsi/g_NCR5380.c             | 3 +--
 drivers/watchdog/pcwd.c              | 7 +------
 include/linux/isa.h                  | 2 +-
 sound/isa/ad1848/ad1848.c            | 3 +--
 sound/isa/adlib.c                    | 3 +--
 sound/isa/cmi8328.c                  | 3 +--
 sound/isa/cmi8330.c                  | 3 +--
 sound/isa/cs423x/cs4231.c            | 3 +--
 sound/isa/cs423x/cs4236.c            | 3 +--
 sound/isa/es1688/es1688.c            | 3 +--
 sound/isa/es18xx.c                   | 3 +--
 sound/isa/galaxy/galaxy.c            | 3 +--
 sound/isa/gus/gusclassic.c           | 3 +--
 sound/isa/gus/gusextreme.c           | 3 +--
 sound/isa/gus/gusmax.c               | 3 +--
 sound/isa/gus/interwave.c            | 3 +--
 sound/isa/msnd/msnd_pinnacle.c       | 3 +--
 sound/isa/opl3sa2.c                  | 3 +--
 sound/isa/opti9xx/miro.c             | 3 +--
 sound/isa/opti9xx/opti92x-ad1848.c   | 3 +--
 sound/isa/sb/jazz16.c                | 3 +--
 sound/isa/sb/sb16.c                  | 3 +--
 sound/isa/sb/sb8.c                   | 3 +--
 sound/isa/sc6000.c                   | 3 +--
 sound/isa/sscape.c                   | 3 +--
 sound/isa/wavefront/wavefront.c      | 3 +--
 36 files changed, 36 insertions(+), 79 deletions(-)


base-commit: 5a158981aafa7f29709034b17bd007b15cb29983
-- 
2.29.2

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v1 0/2] isa: Make the remove callback for isa drivers return void
@ 2021-01-21 20:48 ` Uwe Kleine-König
  0 siblings, 0 replies; 18+ messages in thread
From: Uwe Kleine-König @ 2021-01-21 20:48 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, William Breathitt Gray,
	Greg Kroah-Hartman, Rafael J. Wysocki, Pau Oliva Fora,
	Dmitry Torokhov, Mauro Carvalho Chehab, Wolfgang Grandegger,
	Marc Kleine-Budde, David S. Miller, Jakub Kicinski,
	Matthew Wilcox, Hannes Reinecke, James E.J. Bottomley,
	Martin K. Petersen, Finn Thain, Michael Schmitz, Jaroslav Kysela,
	Takashi Iwai
  Cc: alsa-devel, linux-watchdog, linux-scsi, netdev, linux-kernel,
	linux-can, linux-i2c, linux-input, linux-media

Hello,

as described in the commit log of the 2nd patch returning an error code
from a bus' remove callback doesn't make any difference as the driver
core ignores it and still considers the device removed.

So change the remove callback to return void to not give driver authors
an incentive to believe they could return an error.

There is only a single isa driver in the tree (assuming I didn't miss
any) that has a remove callback that can return a non zero return code.
This is "fixed" in the first patch, to make the second patch more
obviously correct.

Best regards
Uwe

Uwe Kleine-König (2):
  watchdog: pcwd: drop always-false if from remove callback
  isa: Make the remove callback for isa drivers return void

 drivers/base/isa.c                   | 2 +-
 drivers/i2c/busses/i2c-elektor.c     | 4 +---
 drivers/i2c/busses/i2c-pca-isa.c     | 4 +---
 drivers/input/touchscreen/htcpen.c   | 4 +---
 drivers/media/radio/radio-sf16fmr2.c | 4 +---
 drivers/net/can/sja1000/tscan1.c     | 4 +---
 drivers/net/ethernet/3com/3c509.c    | 3 +--
 drivers/scsi/advansys.c              | 3 +--
 drivers/scsi/aha1542.c               | 3 +--
 drivers/scsi/fdomain_isa.c           | 3 +--
 drivers/scsi/g_NCR5380.c             | 3 +--
 drivers/watchdog/pcwd.c              | 7 +------
 include/linux/isa.h                  | 2 +-
 sound/isa/ad1848/ad1848.c            | 3 +--
 sound/isa/adlib.c                    | 3 +--
 sound/isa/cmi8328.c                  | 3 +--
 sound/isa/cmi8330.c                  | 3 +--
 sound/isa/cs423x/cs4231.c            | 3 +--
 sound/isa/cs423x/cs4236.c            | 3 +--
 sound/isa/es1688/es1688.c            | 3 +--
 sound/isa/es18xx.c                   | 3 +--
 sound/isa/galaxy/galaxy.c            | 3 +--
 sound/isa/gus/gusclassic.c           | 3 +--
 sound/isa/gus/gusextreme.c           | 3 +--
 sound/isa/gus/gusmax.c               | 3 +--
 sound/isa/gus/interwave.c            | 3 +--
 sound/isa/msnd/msnd_pinnacle.c       | 3 +--
 sound/isa/opl3sa2.c                  | 3 +--
 sound/isa/opti9xx/miro.c             | 3 +--
 sound/isa/opti9xx/opti92x-ad1848.c   | 3 +--
 sound/isa/sb/jazz16.c                | 3 +--
 sound/isa/sb/sb16.c                  | 3 +--
 sound/isa/sb/sb8.c                   | 3 +--
 sound/isa/sc6000.c                   | 3 +--
 sound/isa/sscape.c                   | 3 +--
 sound/isa/wavefront/wavefront.c      | 3 +--
 36 files changed, 36 insertions(+), 79 deletions(-)


base-commit: 5a158981aafa7f29709034b17bd007b15cb29983
-- 
2.29.2

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v1 1/2] watchdog: pcwd: drop always-false if from remove callback
  2021-01-21 20:48 ` Uwe Kleine-König
  (?)
@ 2021-01-21 20:48 ` Uwe Kleine-König
  2021-01-21 23:08   ` Guenter Roeck
  -1 siblings, 1 reply; 18+ messages in thread
From: Uwe Kleine-König @ 2021-01-21 20:48 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, William Breathitt Gray,
	Greg Kroah-Hartman
  Cc: linux-watchdog, linux-kernel

If pcwd_isa_probe() succeeded pcwd_private.io_addr cannot be NULL. (And
if pcwd_isa_probe() failed, pcwd_isa_remove() isn't called.)

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
 drivers/watchdog/pcwd.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/watchdog/pcwd.c b/drivers/watchdog/pcwd.c
index e86fa7f8351d..b95cd38f3ceb 100644
--- a/drivers/watchdog/pcwd.c
+++ b/drivers/watchdog/pcwd.c
@@ -956,9 +956,6 @@ static int pcwd_isa_remove(struct device *dev, unsigned int id)
 	if (debug >= DEBUG)
 		pr_debug("pcwd_isa_remove id=%d\n", id);
 
-	if (!pcwd_private.io_addr)
-		return 1;
-
 	/*  Disable the board  */
 	if (!nowayout)
 		pcwd_stop();
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 2/2] isa: Make the remove callback for isa drivers return void
  2021-01-21 20:48 ` Uwe Kleine-König
@ 2021-01-21 20:48   ` Uwe Kleine-König
  -1 siblings, 0 replies; 18+ messages in thread
From: Uwe Kleine-König @ 2021-01-21 20:48 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, William Breathitt Gray,
	Greg Kroah-Hartman, Rafael J. Wysocki, Pau Oliva Fora,
	Dmitry Torokhov, Mauro Carvalho Chehab, Wolfgang Grandegger,
	Marc Kleine-Budde, David S. Miller, Jakub Kicinski,
	Matthew Wilcox, Hannes Reinecke, James E.J. Bottomley,
	Martin K. Petersen, Finn Thain, Michael Schmitz, Jaroslav Kysela,
	Takashi Iwai
  Cc: linux-watchdog, linux-kernel, linux-i2c, linux-input,
	linux-media, linux-can, netdev, linux-scsi, alsa-devel

The driver core ignores the return value of the remove callback, so
don't give isa drivers the chance to provide a value.

Adapt all isa_drivers with a remove callbacks accordingly; they all
return 0 unconditionally anyhow.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
 drivers/base/isa.c                   | 2 +-
 drivers/i2c/busses/i2c-elektor.c     | 4 +---
 drivers/i2c/busses/i2c-pca-isa.c     | 4 +---
 drivers/input/touchscreen/htcpen.c   | 4 +---
 drivers/media/radio/radio-sf16fmr2.c | 4 +---
 drivers/net/can/sja1000/tscan1.c     | 4 +---
 drivers/net/ethernet/3com/3c509.c    | 3 +--
 drivers/scsi/advansys.c              | 3 +--
 drivers/scsi/aha1542.c               | 3 +--
 drivers/scsi/fdomain_isa.c           | 3 +--
 drivers/scsi/g_NCR5380.c             | 3 +--
 drivers/watchdog/pcwd.c              | 4 +---
 include/linux/isa.h                  | 2 +-
 sound/isa/ad1848/ad1848.c            | 3 +--
 sound/isa/adlib.c                    | 3 +--
 sound/isa/cmi8328.c                  | 3 +--
 sound/isa/cmi8330.c                  | 3 +--
 sound/isa/cs423x/cs4231.c            | 3 +--
 sound/isa/cs423x/cs4236.c            | 3 +--
 sound/isa/es1688/es1688.c            | 3 +--
 sound/isa/es18xx.c                   | 3 +--
 sound/isa/galaxy/galaxy.c            | 3 +--
 sound/isa/gus/gusclassic.c           | 3 +--
 sound/isa/gus/gusextreme.c           | 3 +--
 sound/isa/gus/gusmax.c               | 3 +--
 sound/isa/gus/interwave.c            | 3 +--
 sound/isa/msnd/msnd_pinnacle.c       | 3 +--
 sound/isa/opl3sa2.c                  | 3 +--
 sound/isa/opti9xx/miro.c             | 3 +--
 sound/isa/opti9xx/opti92x-ad1848.c   | 3 +--
 sound/isa/sb/jazz16.c                | 3 +--
 sound/isa/sb/sb16.c                  | 3 +--
 sound/isa/sb/sb8.c                   | 3 +--
 sound/isa/sc6000.c                   | 3 +--
 sound/isa/sscape.c                   | 3 +--
 sound/isa/wavefront/wavefront.c      | 3 +--
 36 files changed, 36 insertions(+), 76 deletions(-)

diff --git a/drivers/base/isa.c b/drivers/base/isa.c
index 2772f5d1948a..aa4737667026 100644
--- a/drivers/base/isa.c
+++ b/drivers/base/isa.c
@@ -51,7 +51,7 @@ static int isa_bus_remove(struct device *dev)
 	struct isa_driver *isa_driver = dev->platform_data;
 
 	if (isa_driver && isa_driver->remove)
-		return isa_driver->remove(dev, to_isa_dev(dev)->id);
+		isa_driver->remove(dev, to_isa_dev(dev)->id);
 
 	return 0;
 }
diff --git a/drivers/i2c/busses/i2c-elektor.c b/drivers/i2c/busses/i2c-elektor.c
index 140426db28df..b72a3c3ef2ab 100644
--- a/drivers/i2c/busses/i2c-elektor.c
+++ b/drivers/i2c/busses/i2c-elektor.c
@@ -282,7 +282,7 @@ static int elektor_probe(struct device *dev, unsigned int id)
 	return -ENODEV;
 }
 
-static int elektor_remove(struct device *dev, unsigned int id)
+static void elektor_remove(struct device *dev, unsigned int id)
 {
 	i2c_del_adapter(&pcf_isa_ops);
 
@@ -298,8 +298,6 @@ static int elektor_remove(struct device *dev, unsigned int id)
 		iounmap(base_iomem);
 		release_mem_region(base, 2);
 	}
-
-	return 0;
 }
 
 static struct isa_driver i2c_elektor_driver = {
diff --git a/drivers/i2c/busses/i2c-pca-isa.c b/drivers/i2c/busses/i2c-pca-isa.c
index f27bc1e55385..85e8cf58e8bf 100644
--- a/drivers/i2c/busses/i2c-pca-isa.c
+++ b/drivers/i2c/busses/i2c-pca-isa.c
@@ -161,7 +161,7 @@ static int pca_isa_probe(struct device *dev, unsigned int id)
 	return -ENODEV;
 }
 
-static int pca_isa_remove(struct device *dev, unsigned int id)
+static void pca_isa_remove(struct device *dev, unsigned int id)
 {
 	i2c_del_adapter(&pca_isa_ops);
 
@@ -170,8 +170,6 @@ static int pca_isa_remove(struct device *dev, unsigned int id)
 		free_irq(irq, &pca_isa_ops);
 	}
 	release_region(base, IO_SIZE);
-
-	return 0;
 }
 
 static struct isa_driver pca_isa_driver = {
diff --git a/drivers/input/touchscreen/htcpen.c b/drivers/input/touchscreen/htcpen.c
index 2f261a34f9c2..056ba76087e8 100644
--- a/drivers/input/touchscreen/htcpen.c
+++ b/drivers/input/touchscreen/htcpen.c
@@ -171,7 +171,7 @@ static int htcpen_isa_probe(struct device *dev, unsigned int id)
 	return err;
 }
 
-static int htcpen_isa_remove(struct device *dev, unsigned int id)
+static void htcpen_isa_remove(struct device *dev, unsigned int id)
 {
 	struct input_dev *htcpen_dev = dev_get_drvdata(dev);
 
@@ -182,8 +182,6 @@ static int htcpen_isa_remove(struct device *dev, unsigned int id)
 	release_region(HTCPEN_PORT_INDEX, 2);
 	release_region(HTCPEN_PORT_INIT, 1);
 	release_region(HTCPEN_PORT_IRQ_CLEAR, 1);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c
index 0388894cfe41..d0dde55b7930 100644
--- a/drivers/media/radio/radio-sf16fmr2.c
+++ b/drivers/media/radio/radio-sf16fmr2.c
@@ -293,11 +293,9 @@ static void fmr2_remove(struct fmr2 *fmr2)
 	kfree(fmr2);
 }
 
-static int fmr2_isa_remove(struct device *pdev, unsigned int ndev)
+static void fmr2_isa_remove(struct device *pdev, unsigned int ndev)
 {
 	fmr2_remove(dev_get_drvdata(pdev));
-
-	return 0;
 }
 
 static void fmr2_pnp_remove(struct pnp_dev *pdev)
diff --git a/drivers/net/can/sja1000/tscan1.c b/drivers/net/can/sja1000/tscan1.c
index 6ea802c66124..3dbba8d61afb 100644
--- a/drivers/net/can/sja1000/tscan1.c
+++ b/drivers/net/can/sja1000/tscan1.c
@@ -159,7 +159,7 @@ static int tscan1_probe(struct device *dev, unsigned id)
 	return -ENXIO;
 }
 
-static int tscan1_remove(struct device *dev, unsigned id /*unused*/)
+static void tscan1_remove(struct device *dev, unsigned id /*unused*/)
 {
 	struct net_device *netdev;
 	struct sja1000_priv *priv;
@@ -179,8 +179,6 @@ static int tscan1_remove(struct device *dev, unsigned id /*unused*/)
 	release_region(pld_base, TSCAN1_PLD_SIZE);
 
 	free_sja1000dev(netdev);
-
-	return 0;
 }
 
 static struct isa_driver tscan1_isa_driver = {
diff --git a/drivers/net/ethernet/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c
index 667f38c9e4c6..53e1f7e07959 100644
--- a/drivers/net/ethernet/3com/3c509.c
+++ b/drivers/net/ethernet/3com/3c509.c
@@ -335,12 +335,11 @@ static int el3_isa_match(struct device *pdev, unsigned int ndev)
 	return 1;
 }
 
-static int el3_isa_remove(struct device *pdev,
+static void el3_isa_remove(struct device *pdev,
 				    unsigned int ndev)
 {
 	el3_device_remove(pdev);
 	dev_set_drvdata(pdev, NULL);
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 79830e77afa9..b1e97f75b0ba 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -11459,12 +11459,11 @@ static int advansys_isa_probe(struct device *dev, unsigned int id)
 	return err;
 }
 
-static int advansys_isa_remove(struct device *dev, unsigned int id)
+static void advansys_isa_remove(struct device *dev, unsigned int id)
 {
 	int ioport = _asc_def_iop_base[id];
 	advansys_release(dev_get_drvdata(dev));
 	release_region(ioport, ASC_IOADR_GAP);
-	return 0;
 }
 
 static struct isa_driver advansys_isa_driver = {
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index dc5667afeb27..e0d8cca1c70b 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -1025,12 +1025,11 @@ static int aha1542_isa_match(struct device *pdev, unsigned int ndev)
 	return 1;
 }
 
-static int aha1542_isa_remove(struct device *pdev,
+static void aha1542_isa_remove(struct device *pdev,
 				    unsigned int ndev)
 {
 	aha1542_release(dev_get_drvdata(pdev));
 	dev_set_drvdata(pdev, NULL);
-	return 0;
 }
 
 static struct isa_driver aha1542_isa_driver = {
diff --git a/drivers/scsi/fdomain_isa.c b/drivers/scsi/fdomain_isa.c
index e0cdcd2003d0..2b4280a43a53 100644
--- a/drivers/scsi/fdomain_isa.c
+++ b/drivers/scsi/fdomain_isa.c
@@ -175,7 +175,7 @@ static int fdomain_isa_param_match(struct device *dev, unsigned int ndev)
 	return 1;
 }
 
-static int fdomain_isa_remove(struct device *dev, unsigned int ndev)
+static void fdomain_isa_remove(struct device *dev, unsigned int ndev)
 {
 	struct Scsi_Host *sh = dev_get_drvdata(dev);
 	int base = sh->io_port;
@@ -183,7 +183,6 @@ static int fdomain_isa_remove(struct device *dev, unsigned int ndev)
 	fdomain_destroy(sh);
 	release_region(base, FDOMAIN_REGION_SIZE);
 	dev_set_drvdata(dev, NULL);
-	return 0;
 }
 
 static struct isa_driver fdomain_isa_driver = {
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
index 2df2f38a9b12..7ba3c9312731 100644
--- a/drivers/scsi/g_NCR5380.c
+++ b/drivers/scsi/g_NCR5380.c
@@ -720,12 +720,11 @@ static int generic_NCR5380_isa_match(struct device *pdev, unsigned int ndev)
 	return 1;
 }
 
-static int generic_NCR5380_isa_remove(struct device *pdev,
+static void generic_NCR5380_isa_remove(struct device *pdev,
-                                      unsigned int ndev)
+				       unsigned int ndev)
 {
 	generic_NCR5380_release_resources(dev_get_drvdata(pdev));
 	dev_set_drvdata(pdev, NULL);
-	return 0;
 }
 
 static struct isa_driver generic_NCR5380_isa_driver = {
diff --git a/drivers/watchdog/pcwd.c b/drivers/watchdog/pcwd.c
index b95cd38f3ceb..a793b03a785d 100644
--- a/drivers/watchdog/pcwd.c
+++ b/drivers/watchdog/pcwd.c
@@ -951,7 +951,7 @@ static int pcwd_isa_probe(struct device *dev, unsigned int id)
 	return ret;
 }
 
-static int pcwd_isa_remove(struct device *dev, unsigned int id)
+static void pcwd_isa_remove(struct device *dev, unsigned int id)
 {
 	if (debug >= DEBUG)
 		pr_debug("pcwd_isa_remove id=%d\n", id);
@@ -968,8 +968,6 @@ static int pcwd_isa_remove(struct device *dev, unsigned int id)
 			(pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4);
 	pcwd_private.io_addr = 0x0000;
 	cards_found--;
-
-	return 0;
 }
 
 static void pcwd_isa_shutdown(struct device *dev, unsigned int id)
diff --git a/include/linux/isa.h b/include/linux/isa.h
index 41336da0f4e7..e30963190968 100644
--- a/include/linux/isa.h
+++ b/include/linux/isa.h
@@ -13,7 +13,7 @@
 struct isa_driver {
 	int (*match)(struct device *, unsigned int);
 	int (*probe)(struct device *, unsigned int);
-	int (*remove)(struct device *, unsigned int);
+	void (*remove)(struct device *, unsigned int);
 	void (*shutdown)(struct device *, unsigned int);
 	int (*suspend)(struct device *, unsigned int, pm_message_t);
 	int (*resume)(struct device *, unsigned int);
diff --git a/sound/isa/ad1848/ad1848.c b/sound/isa/ad1848/ad1848.c
index 593c6e959afe..48f7cc57c3da 100644
--- a/sound/isa/ad1848/ad1848.c
+++ b/sound/isa/ad1848/ad1848.c
@@ -118,10 +118,9 @@ out:	snd_card_free(card);
 	return error;
 }
 
-static int snd_ad1848_remove(struct device *dev, unsigned int n)
+static void snd_ad1848_remove(struct device *dev, unsigned int n)
 {
 	snd_card_free(dev_get_drvdata(dev));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/adlib.c b/sound/isa/adlib.c
index 5105524b6f38..e6cd7c4da38e 100644
--- a/sound/isa/adlib.c
+++ b/sound/isa/adlib.c
@@ -97,10 +97,9 @@ out:	snd_card_free(card);
 	return error;
 }
 
-static int snd_adlib_remove(struct device *dev, unsigned int n)
+static void snd_adlib_remove(struct device *dev, unsigned int n)
 {
 	snd_card_free(dev_get_drvdata(dev));
-	return 0;
 }
 
 static struct isa_driver snd_adlib_driver = {
diff --git a/sound/isa/cmi8328.c b/sound/isa/cmi8328.c
index faca5dd95bfe..3b9fbb02864b 100644
--- a/sound/isa/cmi8328.c
+++ b/sound/isa/cmi8328.c
@@ -403,7 +403,7 @@ static int snd_cmi8328_probe(struct device *pdev, unsigned int ndev)
 	return err;
 }
 
-static int snd_cmi8328_remove(struct device *pdev, unsigned int dev)
+static void snd_cmi8328_remove(struct device *pdev, unsigned int dev)
 {
 	struct snd_card *card = dev_get_drvdata(pdev);
 	struct snd_cmi8328 *cmi = card->private_data;
@@ -420,7 +420,6 @@ static int snd_cmi8328_remove(struct device *pdev, unsigned int dev)
 	snd_cmi8328_cfg_write(cmi->port, CFG2, 0);
 	snd_cmi8328_cfg_write(cmi->port, CFG3, 0);
 	snd_card_free(card);
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c
index 4669eb0cc8ce..19e258527d69 100644
--- a/sound/isa/cmi8330.c
+++ b/sound/isa/cmi8330.c
@@ -631,11 +631,10 @@ static int snd_cmi8330_isa_probe(struct device *pdev,
 	return 0;
 }
 
-static int snd_cmi8330_isa_remove(struct device *devptr,
+static void snd_cmi8330_isa_remove(struct device *devptr,
 				  unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/cs423x/cs4231.c b/sound/isa/cs423x/cs4231.c
index 2135963eba78..383ee621cea1 100644
--- a/sound/isa/cs423x/cs4231.c
+++ b/sound/isa/cs423x/cs4231.c
@@ -135,10 +135,9 @@ out:	snd_card_free(card);
 	return error;
 }
 
-static int snd_cs4231_remove(struct device *dev, unsigned int n)
+static void snd_cs4231_remove(struct device *dev, unsigned int n)
 {
 	snd_card_free(dev_get_drvdata(dev));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c
index fa3c39cff5f8..24688271e73f 100644
--- a/sound/isa/cs423x/cs4236.c
+++ b/sound/isa/cs423x/cs4236.c
@@ -487,11 +487,10 @@ static int snd_cs423x_isa_probe(struct device *pdev,
 	return 0;
 }
 
-static int snd_cs423x_isa_remove(struct device *pdev,
+static void snd_cs423x_isa_remove(struct device *pdev,
 				 unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(pdev));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c
index 64610571a5e1..d99bb3f8f0c1 100644
--- a/sound/isa/es1688/es1688.c
+++ b/sound/isa/es1688/es1688.c
@@ -192,10 +192,9 @@ static int snd_es1688_isa_probe(struct device *dev, unsigned int n)
 	return error;
 }
 
-static int snd_es1688_isa_remove(struct device *dev, unsigned int n)
+static void snd_es1688_isa_remove(struct device *dev, unsigned int n)
 {
 	snd_card_free(dev_get_drvdata(dev));
-	return 0;
 }
 
 static struct isa_driver snd_es1688_driver = {
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
index 5f8d7e8a5477..9beef8079177 100644
--- a/sound/isa/es18xx.c
+++ b/sound/isa/es18xx.c
@@ -2210,11 +2210,10 @@ static int snd_es18xx_isa_probe(struct device *pdev, unsigned int dev)
 	}
 }
 
-static int snd_es18xx_isa_remove(struct device *devptr,
-				 unsigned int dev)
+static void snd_es18xx_isa_remove(struct device *devptr,
+				  unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/galaxy/galaxy.c b/sound/isa/galaxy/galaxy.c
index 65f9f46c9f58..d33d69f29924 100644
--- a/sound/isa/galaxy/galaxy.c
+++ b/sound/isa/galaxy/galaxy.c
@@ -608,10 +608,9 @@ static int snd_galaxy_probe(struct device *dev, unsigned int n)
 	return err;
 }
 
-static int snd_galaxy_remove(struct device *dev, unsigned int n)
+static void snd_galaxy_remove(struct device *dev, unsigned int n)
 {
 	snd_card_free(dev_get_drvdata(dev));
-	return 0;
 }
 
 static struct isa_driver snd_galaxy_driver = {
diff --git a/sound/isa/gus/gusclassic.c b/sound/isa/gus/gusclassic.c
index 7419b1939754..015f88a11352 100644
--- a/sound/isa/gus/gusclassic.c
+++ b/sound/isa/gus/gusclassic.c
@@ -195,10 +195,9 @@ out:	snd_card_free(card);
 	return error;
 }
 
-static int snd_gusclassic_remove(struct device *dev, unsigned int n)
+static void snd_gusclassic_remove(struct device *dev, unsigned int n)
 {
 	snd_card_free(dev_get_drvdata(dev));
-	return 0;
 }
 
 static struct isa_driver snd_gusclassic_driver = {
diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c
index ed2f9d64efae..c9f31b4fb887 100644
--- a/sound/isa/gus/gusextreme.c
+++ b/sound/isa/gus/gusextreme.c
@@ -324,10 +324,9 @@ out:	snd_card_free(card);
 	return error;
 }
 
-static int snd_gusextreme_remove(struct device *dev, unsigned int n)
+static void snd_gusextreme_remove(struct device *dev, unsigned int n)
 {
 	snd_card_free(dev_get_drvdata(dev));
-	return 0;
 }
 
 static struct isa_driver snd_gusextreme_driver = {
diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c
index 05cd9be4dd8a..dc09fbd6f88d 100644
--- a/sound/isa/gus/gusmax.c
+++ b/sound/isa/gus/gusmax.c
@@ -338,10 +338,9 @@ static int snd_gusmax_probe(struct device *pdev, unsigned int dev)
 	return err;
 }
 
-static int snd_gusmax_remove(struct device *devptr, unsigned int dev)
+static void snd_gusmax_remove(struct device *devptr, unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 #define DEV_NAME "gusmax"
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c
index 3e9ad930deae..e4d412e72b75 100644
--- a/sound/isa/gus/interwave.c
+++ b/sound/isa/gus/interwave.c
@@ -825,10 +825,9 @@ static int snd_interwave_isa_probe(struct device *pdev,
 	}
 }
 
-static int snd_interwave_isa_remove(struct device *devptr, unsigned int dev)
+static void snd_interwave_isa_remove(struct device *devptr, unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 static struct isa_driver snd_interwave_driver = {
diff --git a/sound/isa/msnd/msnd_pinnacle.c b/sound/isa/msnd/msnd_pinnacle.c
index 24b34ecf5e5b..69647b41300d 100644
--- a/sound/isa/msnd/msnd_pinnacle.c
+++ b/sound/isa/msnd/msnd_pinnacle.c
@@ -1049,10 +1049,9 @@ static int snd_msnd_isa_probe(struct device *pdev, unsigned int idx)
 #endif
 }
 
-static int snd_msnd_isa_remove(struct device *pdev, unsigned int dev)
+static void snd_msnd_isa_remove(struct device *pdev, unsigned int dev)
 {
 	snd_msnd_unload(dev_get_drvdata(pdev));
-	return 0;
 }
 
 static struct isa_driver snd_msnd_driver = {
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
index 85a181acd388..7649a8a4128d 100644
--- a/sound/isa/opl3sa2.c
+++ b/sound/isa/opl3sa2.c
@@ -878,11 +878,10 @@ static int snd_opl3sa2_isa_probe(struct device *pdev,
 	return 0;
 }
 
-static int snd_opl3sa2_isa_remove(struct device *devptr,
+static void snd_opl3sa2_isa_remove(struct device *devptr,
 				  unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c
index 44ed1b65f6ce..20933342f5eb 100644
--- a/sound/isa/opti9xx/miro.c
+++ b/sound/isa/opti9xx/miro.c
@@ -1480,11 +1480,10 @@ static int snd_miro_isa_probe(struct device *devptr, unsigned int n)
 	return 0;
 }
 
-static int snd_miro_isa_remove(struct device *devptr,
+static void snd_miro_isa_remove(struct device *devptr,
 			       unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 #define DEV_NAME "miro"
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
index 881d3b5711d2..758f5b579138 100644
--- a/sound/isa/opti9xx/opti92x-ad1848.c
+++ b/sound/isa/opti9xx/opti92x-ad1848.c
@@ -1024,11 +1024,10 @@ static int snd_opti9xx_isa_probe(struct device *devptr,
 	return 0;
 }
 
-static int snd_opti9xx_isa_remove(struct device *devptr,
-				  unsigned int dev)
+static void snd_opti9xx_isa_remove(struct device *devptr,
+				   unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/sb/jazz16.c b/sound/isa/sb/jazz16.c
index ee379bbf70a4..0e2e0ab3b9e4 100644
--- a/sound/isa/sb/jazz16.c
+++ b/sound/isa/sb/jazz16.c
@@ -339,12 +339,11 @@ static int snd_jazz16_probe(struct device *devptr, unsigned int dev)
 	return err;
 }
 
-static int snd_jazz16_remove(struct device *devptr, unsigned int dev)
+static void snd_jazz16_remove(struct device *devptr, unsigned int dev)
 {
 	struct snd_card *card = dev_get_drvdata(devptr);
 
 	snd_card_free(card);
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c
index 479197c13803..db284b7b88a7 100644
--- a/sound/isa/sb/sb16.c
+++ b/sound/isa/sb/sb16.c
@@ -547,10 +547,9 @@ static int snd_sb16_isa_probe(struct device *pdev, unsigned int dev)
 	}
 }
 
-static int snd_sb16_isa_remove(struct device *pdev, unsigned int dev)
+static void snd_sb16_isa_remove(struct device *pdev, unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(pdev));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c
index 438109f167d6..8e3e67b9a341 100644
--- a/sound/isa/sb/sb8.c
+++ b/sound/isa/sb/sb8.c
@@ -192,10 +192,9 @@ static int snd_sb8_probe(struct device *pdev, unsigned int dev)
 	return err;
 }
 
-static int snd_sb8_remove(struct device *pdev, unsigned int dev)
+static void snd_sb8_remove(struct device *pdev, unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(pdev));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/sc6000.c b/sound/isa/sc6000.c
index 3d0bea44f454..def137579717 100644
--- a/sound/isa/sc6000.c
+++ b/sound/isa/sc6000.c
@@ -672,7 +672,7 @@ static int snd_sc6000_probe(struct device *devptr, unsigned int dev)
 	return err;
 }
 
-static int snd_sc6000_remove(struct device *devptr, unsigned int dev)
+static void snd_sc6000_remove(struct device *devptr, unsigned int dev)
 {
 	struct snd_card *card = dev_get_drvdata(devptr);
 	char __iomem **vport = card->private_data;
@@ -684,7 +684,6 @@ static int snd_sc6000_remove(struct device *devptr, unsigned int dev)
 	release_region(mss_port[dev], 4);
 
 	snd_card_free(card);
-	return 0;
 }
 
 static struct isa_driver snd_sc6000_driver = {
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c
index 2e5a5c5279e8..e70ef9aee545 100644
--- a/sound/isa/sscape.c
+++ b/sound/isa/sscape.c
@@ -1183,10 +1183,9 @@ static int snd_sscape_probe(struct device *pdev, unsigned int dev)
 	return ret;
 }
 
-static int snd_sscape_remove(struct device *devptr, unsigned int dev)
+static void snd_sscape_remove(struct device *devptr, unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 #define DEV_NAME "sscape"
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c
index 9e0f6b226775..b750a4fd40de 100644
--- a/sound/isa/wavefront/wavefront.c
+++ b/sound/isa/wavefront/wavefront.c
@@ -565,11 +565,10 @@ static int snd_wavefront_isa_probe(struct device *pdev,
 	return 0;
 }
 
-static int snd_wavefront_isa_remove(struct device *devptr,
+static void snd_wavefront_isa_remove(struct device *devptr,
 				    unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 #define DEV_NAME "wavefront"
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v1 2/2] isa: Make the remove callback for isa drivers return void
@ 2021-01-21 20:48   ` Uwe Kleine-König
  0 siblings, 0 replies; 18+ messages in thread
From: Uwe Kleine-König @ 2021-01-21 20:48 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, William Breathitt Gray,
	Greg Kroah-Hartman, Rafael J. Wysocki, Pau Oliva Fora,
	Dmitry Torokhov, Mauro Carvalho Chehab, Wolfgang Grandegger,
	Marc Kleine-Budde, David S. Miller, Jakub Kicinski,
	Matthew Wilcox, Hannes Reinecke, James E.J. Bottomley,
	Martin K. Petersen, Finn Thain, Michael Schmitz, Jaroslav Kysela,
	Takashi Iwai
  Cc: alsa-devel, linux-watchdog, linux-scsi, netdev, linux-kernel,
	linux-can, linux-i2c, linux-input, linux-media

The driver core ignores the return value of the remove callback, so
don't give isa drivers the chance to provide a value.

Adapt all isa_drivers with a remove callbacks accordingly; they all
return 0 unconditionally anyhow.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
 drivers/base/isa.c                   | 2 +-
 drivers/i2c/busses/i2c-elektor.c     | 4 +---
 drivers/i2c/busses/i2c-pca-isa.c     | 4 +---
 drivers/input/touchscreen/htcpen.c   | 4 +---
 drivers/media/radio/radio-sf16fmr2.c | 4 +---
 drivers/net/can/sja1000/tscan1.c     | 4 +---
 drivers/net/ethernet/3com/3c509.c    | 3 +--
 drivers/scsi/advansys.c              | 3 +--
 drivers/scsi/aha1542.c               | 3 +--
 drivers/scsi/fdomain_isa.c           | 3 +--
 drivers/scsi/g_NCR5380.c             | 3 +--
 drivers/watchdog/pcwd.c              | 4 +---
 include/linux/isa.h                  | 2 +-
 sound/isa/ad1848/ad1848.c            | 3 +--
 sound/isa/adlib.c                    | 3 +--
 sound/isa/cmi8328.c                  | 3 +--
 sound/isa/cmi8330.c                  | 3 +--
 sound/isa/cs423x/cs4231.c            | 3 +--
 sound/isa/cs423x/cs4236.c            | 3 +--
 sound/isa/es1688/es1688.c            | 3 +--
 sound/isa/es18xx.c                   | 3 +--
 sound/isa/galaxy/galaxy.c            | 3 +--
 sound/isa/gus/gusclassic.c           | 3 +--
 sound/isa/gus/gusextreme.c           | 3 +--
 sound/isa/gus/gusmax.c               | 3 +--
 sound/isa/gus/interwave.c            | 3 +--
 sound/isa/msnd/msnd_pinnacle.c       | 3 +--
 sound/isa/opl3sa2.c                  | 3 +--
 sound/isa/opti9xx/miro.c             | 3 +--
 sound/isa/opti9xx/opti92x-ad1848.c   | 3 +--
 sound/isa/sb/jazz16.c                | 3 +--
 sound/isa/sb/sb16.c                  | 3 +--
 sound/isa/sb/sb8.c                   | 3 +--
 sound/isa/sc6000.c                   | 3 +--
 sound/isa/sscape.c                   | 3 +--
 sound/isa/wavefront/wavefront.c      | 3 +--
 36 files changed, 36 insertions(+), 76 deletions(-)

diff --git a/drivers/base/isa.c b/drivers/base/isa.c
index 2772f5d1948a..aa4737667026 100644
--- a/drivers/base/isa.c
+++ b/drivers/base/isa.c
@@ -51,7 +51,7 @@ static int isa_bus_remove(struct device *dev)
 	struct isa_driver *isa_driver = dev->platform_data;
 
 	if (isa_driver && isa_driver->remove)
-		return isa_driver->remove(dev, to_isa_dev(dev)->id);
+		isa_driver->remove(dev, to_isa_dev(dev)->id);
 
 	return 0;
 }
diff --git a/drivers/i2c/busses/i2c-elektor.c b/drivers/i2c/busses/i2c-elektor.c
index 140426db28df..b72a3c3ef2ab 100644
--- a/drivers/i2c/busses/i2c-elektor.c
+++ b/drivers/i2c/busses/i2c-elektor.c
@@ -282,7 +282,7 @@ static int elektor_probe(struct device *dev, unsigned int id)
 	return -ENODEV;
 }
 
-static int elektor_remove(struct device *dev, unsigned int id)
+static void elektor_remove(struct device *dev, unsigned int id)
 {
 	i2c_del_adapter(&pcf_isa_ops);
 
@@ -298,8 +298,6 @@ static int elektor_remove(struct device *dev, unsigned int id)
 		iounmap(base_iomem);
 		release_mem_region(base, 2);
 	}
-
-	return 0;
 }
 
 static struct isa_driver i2c_elektor_driver = {
diff --git a/drivers/i2c/busses/i2c-pca-isa.c b/drivers/i2c/busses/i2c-pca-isa.c
index f27bc1e55385..85e8cf58e8bf 100644
--- a/drivers/i2c/busses/i2c-pca-isa.c
+++ b/drivers/i2c/busses/i2c-pca-isa.c
@@ -161,7 +161,7 @@ static int pca_isa_probe(struct device *dev, unsigned int id)
 	return -ENODEV;
 }
 
-static int pca_isa_remove(struct device *dev, unsigned int id)
+static void pca_isa_remove(struct device *dev, unsigned int id)
 {
 	i2c_del_adapter(&pca_isa_ops);
 
@@ -170,8 +170,6 @@ static int pca_isa_remove(struct device *dev, unsigned int id)
 		free_irq(irq, &pca_isa_ops);
 	}
 	release_region(base, IO_SIZE);
-
-	return 0;
 }
 
 static struct isa_driver pca_isa_driver = {
diff --git a/drivers/input/touchscreen/htcpen.c b/drivers/input/touchscreen/htcpen.c
index 2f261a34f9c2..056ba76087e8 100644
--- a/drivers/input/touchscreen/htcpen.c
+++ b/drivers/input/touchscreen/htcpen.c
@@ -171,7 +171,7 @@ static int htcpen_isa_probe(struct device *dev, unsigned int id)
 	return err;
 }
 
-static int htcpen_isa_remove(struct device *dev, unsigned int id)
+static void htcpen_isa_remove(struct device *dev, unsigned int id)
 {
 	struct input_dev *htcpen_dev = dev_get_drvdata(dev);
 
@@ -182,8 +182,6 @@ static int htcpen_isa_remove(struct device *dev, unsigned int id)
 	release_region(HTCPEN_PORT_INDEX, 2);
 	release_region(HTCPEN_PORT_INIT, 1);
 	release_region(HTCPEN_PORT_IRQ_CLEAR, 1);
-
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c
index 0388894cfe41..d0dde55b7930 100644
--- a/drivers/media/radio/radio-sf16fmr2.c
+++ b/drivers/media/radio/radio-sf16fmr2.c
@@ -293,11 +293,9 @@ static void fmr2_remove(struct fmr2 *fmr2)
 	kfree(fmr2);
 }
 
-static int fmr2_isa_remove(struct device *pdev, unsigned int ndev)
+static void fmr2_isa_remove(struct device *pdev, unsigned int ndev)
 {
 	fmr2_remove(dev_get_drvdata(pdev));
-
-	return 0;
 }
 
 static void fmr2_pnp_remove(struct pnp_dev *pdev)
diff --git a/drivers/net/can/sja1000/tscan1.c b/drivers/net/can/sja1000/tscan1.c
index 6ea802c66124..3dbba8d61afb 100644
--- a/drivers/net/can/sja1000/tscan1.c
+++ b/drivers/net/can/sja1000/tscan1.c
@@ -159,7 +159,7 @@ static int tscan1_probe(struct device *dev, unsigned id)
 	return -ENXIO;
 }
 
-static int tscan1_remove(struct device *dev, unsigned id /*unused*/)
+static void tscan1_remove(struct device *dev, unsigned id /*unused*/)
 {
 	struct net_device *netdev;
 	struct sja1000_priv *priv;
@@ -179,8 +179,6 @@ static int tscan1_remove(struct device *dev, unsigned id /*unused*/)
 	release_region(pld_base, TSCAN1_PLD_SIZE);
 
 	free_sja1000dev(netdev);
-
-	return 0;
 }
 
 static struct isa_driver tscan1_isa_driver = {
diff --git a/drivers/net/ethernet/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c
index 667f38c9e4c6..53e1f7e07959 100644
--- a/drivers/net/ethernet/3com/3c509.c
+++ b/drivers/net/ethernet/3com/3c509.c
@@ -335,12 +335,11 @@ static int el3_isa_match(struct device *pdev, unsigned int ndev)
 	return 1;
 }
 
-static int el3_isa_remove(struct device *pdev,
+static void el3_isa_remove(struct device *pdev,
 				    unsigned int ndev)
 {
 	el3_device_remove(pdev);
 	dev_set_drvdata(pdev, NULL);
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 79830e77afa9..b1e97f75b0ba 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -11459,12 +11459,11 @@ static int advansys_isa_probe(struct device *dev, unsigned int id)
 	return err;
 }
 
-static int advansys_isa_remove(struct device *dev, unsigned int id)
+static void advansys_isa_remove(struct device *dev, unsigned int id)
 {
 	int ioport = _asc_def_iop_base[id];
 	advansys_release(dev_get_drvdata(dev));
 	release_region(ioport, ASC_IOADR_GAP);
-	return 0;
 }
 
 static struct isa_driver advansys_isa_driver = {
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index dc5667afeb27..e0d8cca1c70b 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -1025,12 +1025,11 @@ static int aha1542_isa_match(struct device *pdev, unsigned int ndev)
 	return 1;
 }
 
-static int aha1542_isa_remove(struct device *pdev,
+static void aha1542_isa_remove(struct device *pdev,
 				    unsigned int ndev)
 {
 	aha1542_release(dev_get_drvdata(pdev));
 	dev_set_drvdata(pdev, NULL);
-	return 0;
 }
 
 static struct isa_driver aha1542_isa_driver = {
diff --git a/drivers/scsi/fdomain_isa.c b/drivers/scsi/fdomain_isa.c
index e0cdcd2003d0..2b4280a43a53 100644
--- a/drivers/scsi/fdomain_isa.c
+++ b/drivers/scsi/fdomain_isa.c
@@ -175,7 +175,7 @@ static int fdomain_isa_param_match(struct device *dev, unsigned int ndev)
 	return 1;
 }
 
-static int fdomain_isa_remove(struct device *dev, unsigned int ndev)
+static void fdomain_isa_remove(struct device *dev, unsigned int ndev)
 {
 	struct Scsi_Host *sh = dev_get_drvdata(dev);
 	int base = sh->io_port;
@@ -183,7 +183,6 @@ static int fdomain_isa_remove(struct device *dev, unsigned int ndev)
 	fdomain_destroy(sh);
 	release_region(base, FDOMAIN_REGION_SIZE);
 	dev_set_drvdata(dev, NULL);
-	return 0;
 }
 
 static struct isa_driver fdomain_isa_driver = {
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
index 2df2f38a9b12..7ba3c9312731 100644
--- a/drivers/scsi/g_NCR5380.c
+++ b/drivers/scsi/g_NCR5380.c
@@ -720,12 +720,11 @@ static int generic_NCR5380_isa_match(struct device *pdev, unsigned int ndev)
 	return 1;
 }
 
-static int generic_NCR5380_isa_remove(struct device *pdev,
+static void generic_NCR5380_isa_remove(struct device *pdev,
-                                      unsigned int ndev)
+				       unsigned int ndev)
 {
 	generic_NCR5380_release_resources(dev_get_drvdata(pdev));
 	dev_set_drvdata(pdev, NULL);
-	return 0;
 }
 
 static struct isa_driver generic_NCR5380_isa_driver = {
diff --git a/drivers/watchdog/pcwd.c b/drivers/watchdog/pcwd.c
index b95cd38f3ceb..a793b03a785d 100644
--- a/drivers/watchdog/pcwd.c
+++ b/drivers/watchdog/pcwd.c
@@ -951,7 +951,7 @@ static int pcwd_isa_probe(struct device *dev, unsigned int id)
 	return ret;
 }
 
-static int pcwd_isa_remove(struct device *dev, unsigned int id)
+static void pcwd_isa_remove(struct device *dev, unsigned int id)
 {
 	if (debug >= DEBUG)
 		pr_debug("pcwd_isa_remove id=%d\n", id);
@@ -968,8 +968,6 @@ static int pcwd_isa_remove(struct device *dev, unsigned int id)
 			(pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4);
 	pcwd_private.io_addr = 0x0000;
 	cards_found--;
-
-	return 0;
 }
 
 static void pcwd_isa_shutdown(struct device *dev, unsigned int id)
diff --git a/include/linux/isa.h b/include/linux/isa.h
index 41336da0f4e7..e30963190968 100644
--- a/include/linux/isa.h
+++ b/include/linux/isa.h
@@ -13,7 +13,7 @@
 struct isa_driver {
 	int (*match)(struct device *, unsigned int);
 	int (*probe)(struct device *, unsigned int);
-	int (*remove)(struct device *, unsigned int);
+	void (*remove)(struct device *, unsigned int);
 	void (*shutdown)(struct device *, unsigned int);
 	int (*suspend)(struct device *, unsigned int, pm_message_t);
 	int (*resume)(struct device *, unsigned int);
diff --git a/sound/isa/ad1848/ad1848.c b/sound/isa/ad1848/ad1848.c
index 593c6e959afe..48f7cc57c3da 100644
--- a/sound/isa/ad1848/ad1848.c
+++ b/sound/isa/ad1848/ad1848.c
@@ -118,10 +118,9 @@ out:	snd_card_free(card);
 	return error;
 }
 
-static int snd_ad1848_remove(struct device *dev, unsigned int n)
+static void snd_ad1848_remove(struct device *dev, unsigned int n)
 {
 	snd_card_free(dev_get_drvdata(dev));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/adlib.c b/sound/isa/adlib.c
index 5105524b6f38..e6cd7c4da38e 100644
--- a/sound/isa/adlib.c
+++ b/sound/isa/adlib.c
@@ -97,10 +97,9 @@ out:	snd_card_free(card);
 	return error;
 }
 
-static int snd_adlib_remove(struct device *dev, unsigned int n)
+static void snd_adlib_remove(struct device *dev, unsigned int n)
 {
 	snd_card_free(dev_get_drvdata(dev));
-	return 0;
 }
 
 static struct isa_driver snd_adlib_driver = {
diff --git a/sound/isa/cmi8328.c b/sound/isa/cmi8328.c
index faca5dd95bfe..3b9fbb02864b 100644
--- a/sound/isa/cmi8328.c
+++ b/sound/isa/cmi8328.c
@@ -403,7 +403,7 @@ static int snd_cmi8328_probe(struct device *pdev, unsigned int ndev)
 	return err;
 }
 
-static int snd_cmi8328_remove(struct device *pdev, unsigned int dev)
+static void snd_cmi8328_remove(struct device *pdev, unsigned int dev)
 {
 	struct snd_card *card = dev_get_drvdata(pdev);
 	struct snd_cmi8328 *cmi = card->private_data;
@@ -420,7 +420,6 @@ static int snd_cmi8328_remove(struct device *pdev, unsigned int dev)
 	snd_cmi8328_cfg_write(cmi->port, CFG2, 0);
 	snd_cmi8328_cfg_write(cmi->port, CFG3, 0);
 	snd_card_free(card);
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c
index 4669eb0cc8ce..19e258527d69 100644
--- a/sound/isa/cmi8330.c
+++ b/sound/isa/cmi8330.c
@@ -631,11 +631,10 @@ static int snd_cmi8330_isa_probe(struct device *pdev,
 	return 0;
 }
 
-static int snd_cmi8330_isa_remove(struct device *devptr,
+static void snd_cmi8330_isa_remove(struct device *devptr,
 				  unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/cs423x/cs4231.c b/sound/isa/cs423x/cs4231.c
index 2135963eba78..383ee621cea1 100644
--- a/sound/isa/cs423x/cs4231.c
+++ b/sound/isa/cs423x/cs4231.c
@@ -135,10 +135,9 @@ out:	snd_card_free(card);
 	return error;
 }
 
-static int snd_cs4231_remove(struct device *dev, unsigned int n)
+static void snd_cs4231_remove(struct device *dev, unsigned int n)
 {
 	snd_card_free(dev_get_drvdata(dev));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c
index fa3c39cff5f8..24688271e73f 100644
--- a/sound/isa/cs423x/cs4236.c
+++ b/sound/isa/cs423x/cs4236.c
@@ -487,11 +487,10 @@ static int snd_cs423x_isa_probe(struct device *pdev,
 	return 0;
 }
 
-static int snd_cs423x_isa_remove(struct device *pdev,
+static void snd_cs423x_isa_remove(struct device *pdev,
 				 unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(pdev));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c
index 64610571a5e1..d99bb3f8f0c1 100644
--- a/sound/isa/es1688/es1688.c
+++ b/sound/isa/es1688/es1688.c
@@ -192,10 +192,9 @@ static int snd_es1688_isa_probe(struct device *dev, unsigned int n)
 	return error;
 }
 
-static int snd_es1688_isa_remove(struct device *dev, unsigned int n)
+static void snd_es1688_isa_remove(struct device *dev, unsigned int n)
 {
 	snd_card_free(dev_get_drvdata(dev));
-	return 0;
 }
 
 static struct isa_driver snd_es1688_driver = {
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
index 5f8d7e8a5477..9beef8079177 100644
--- a/sound/isa/es18xx.c
+++ b/sound/isa/es18xx.c
@@ -2210,11 +2210,10 @@ static int snd_es18xx_isa_probe(struct device *pdev, unsigned int dev)
 	}
 }
 
-static int snd_es18xx_isa_remove(struct device *devptr,
-				 unsigned int dev)
+static void snd_es18xx_isa_remove(struct device *devptr,
+				  unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/galaxy/galaxy.c b/sound/isa/galaxy/galaxy.c
index 65f9f46c9f58..d33d69f29924 100644
--- a/sound/isa/galaxy/galaxy.c
+++ b/sound/isa/galaxy/galaxy.c
@@ -608,10 +608,9 @@ static int snd_galaxy_probe(struct device *dev, unsigned int n)
 	return err;
 }
 
-static int snd_galaxy_remove(struct device *dev, unsigned int n)
+static void snd_galaxy_remove(struct device *dev, unsigned int n)
 {
 	snd_card_free(dev_get_drvdata(dev));
-	return 0;
 }
 
 static struct isa_driver snd_galaxy_driver = {
diff --git a/sound/isa/gus/gusclassic.c b/sound/isa/gus/gusclassic.c
index 7419b1939754..015f88a11352 100644
--- a/sound/isa/gus/gusclassic.c
+++ b/sound/isa/gus/gusclassic.c
@@ -195,10 +195,9 @@ out:	snd_card_free(card);
 	return error;
 }
 
-static int snd_gusclassic_remove(struct device *dev, unsigned int n)
+static void snd_gusclassic_remove(struct device *dev, unsigned int n)
 {
 	snd_card_free(dev_get_drvdata(dev));
-	return 0;
 }
 
 static struct isa_driver snd_gusclassic_driver = {
diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c
index ed2f9d64efae..c9f31b4fb887 100644
--- a/sound/isa/gus/gusextreme.c
+++ b/sound/isa/gus/gusextreme.c
@@ -324,10 +324,9 @@ out:	snd_card_free(card);
 	return error;
 }
 
-static int snd_gusextreme_remove(struct device *dev, unsigned int n)
+static void snd_gusextreme_remove(struct device *dev, unsigned int n)
 {
 	snd_card_free(dev_get_drvdata(dev));
-	return 0;
 }
 
 static struct isa_driver snd_gusextreme_driver = {
diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c
index 05cd9be4dd8a..dc09fbd6f88d 100644
--- a/sound/isa/gus/gusmax.c
+++ b/sound/isa/gus/gusmax.c
@@ -338,10 +338,9 @@ static int snd_gusmax_probe(struct device *pdev, unsigned int dev)
 	return err;
 }
 
-static int snd_gusmax_remove(struct device *devptr, unsigned int dev)
+static void snd_gusmax_remove(struct device *devptr, unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 #define DEV_NAME "gusmax"
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c
index 3e9ad930deae..e4d412e72b75 100644
--- a/sound/isa/gus/interwave.c
+++ b/sound/isa/gus/interwave.c
@@ -825,10 +825,9 @@ static int snd_interwave_isa_probe(struct device *pdev,
 	}
 }
 
-static int snd_interwave_isa_remove(struct device *devptr, unsigned int dev)
+static void snd_interwave_isa_remove(struct device *devptr, unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 static struct isa_driver snd_interwave_driver = {
diff --git a/sound/isa/msnd/msnd_pinnacle.c b/sound/isa/msnd/msnd_pinnacle.c
index 24b34ecf5e5b..69647b41300d 100644
--- a/sound/isa/msnd/msnd_pinnacle.c
+++ b/sound/isa/msnd/msnd_pinnacle.c
@@ -1049,10 +1049,9 @@ static int snd_msnd_isa_probe(struct device *pdev, unsigned int idx)
 #endif
 }
 
-static int snd_msnd_isa_remove(struct device *pdev, unsigned int dev)
+static void snd_msnd_isa_remove(struct device *pdev, unsigned int dev)
 {
 	snd_msnd_unload(dev_get_drvdata(pdev));
-	return 0;
 }
 
 static struct isa_driver snd_msnd_driver = {
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
index 85a181acd388..7649a8a4128d 100644
--- a/sound/isa/opl3sa2.c
+++ b/sound/isa/opl3sa2.c
@@ -878,11 +878,10 @@ static int snd_opl3sa2_isa_probe(struct device *pdev,
 	return 0;
 }
 
-static int snd_opl3sa2_isa_remove(struct device *devptr,
+static void snd_opl3sa2_isa_remove(struct device *devptr,
 				  unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c
index 44ed1b65f6ce..20933342f5eb 100644
--- a/sound/isa/opti9xx/miro.c
+++ b/sound/isa/opti9xx/miro.c
@@ -1480,11 +1480,10 @@ static int snd_miro_isa_probe(struct device *devptr, unsigned int n)
 	return 0;
 }
 
-static int snd_miro_isa_remove(struct device *devptr,
+static void snd_miro_isa_remove(struct device *devptr,
 			       unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 #define DEV_NAME "miro"
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
index 881d3b5711d2..758f5b579138 100644
--- a/sound/isa/opti9xx/opti92x-ad1848.c
+++ b/sound/isa/opti9xx/opti92x-ad1848.c
@@ -1024,11 +1024,10 @@ static int snd_opti9xx_isa_probe(struct device *devptr,
 	return 0;
 }
 
-static int snd_opti9xx_isa_remove(struct device *devptr,
-				  unsigned int dev)
+static void snd_opti9xx_isa_remove(struct device *devptr,
+				   unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/sb/jazz16.c b/sound/isa/sb/jazz16.c
index ee379bbf70a4..0e2e0ab3b9e4 100644
--- a/sound/isa/sb/jazz16.c
+++ b/sound/isa/sb/jazz16.c
@@ -339,12 +339,11 @@ static int snd_jazz16_probe(struct device *devptr, unsigned int dev)
 	return err;
 }
 
-static int snd_jazz16_remove(struct device *devptr, unsigned int dev)
+static void snd_jazz16_remove(struct device *devptr, unsigned int dev)
 {
 	struct snd_card *card = dev_get_drvdata(devptr);
 
 	snd_card_free(card);
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c
index 479197c13803..db284b7b88a7 100644
--- a/sound/isa/sb/sb16.c
+++ b/sound/isa/sb/sb16.c
@@ -547,10 +547,9 @@ static int snd_sb16_isa_probe(struct device *pdev, unsigned int dev)
 	}
 }
 
-static int snd_sb16_isa_remove(struct device *pdev, unsigned int dev)
+static void snd_sb16_isa_remove(struct device *pdev, unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(pdev));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c
index 438109f167d6..8e3e67b9a341 100644
--- a/sound/isa/sb/sb8.c
+++ b/sound/isa/sb/sb8.c
@@ -192,10 +192,9 @@ static int snd_sb8_probe(struct device *pdev, unsigned int dev)
 	return err;
 }
 
-static int snd_sb8_remove(struct device *pdev, unsigned int dev)
+static void snd_sb8_remove(struct device *pdev, unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(pdev));
-	return 0;
 }
 
 #ifdef CONFIG_PM
diff --git a/sound/isa/sc6000.c b/sound/isa/sc6000.c
index 3d0bea44f454..def137579717 100644
--- a/sound/isa/sc6000.c
+++ b/sound/isa/sc6000.c
@@ -672,7 +672,7 @@ static int snd_sc6000_probe(struct device *devptr, unsigned int dev)
 	return err;
 }
 
-static int snd_sc6000_remove(struct device *devptr, unsigned int dev)
+static void snd_sc6000_remove(struct device *devptr, unsigned int dev)
 {
 	struct snd_card *card = dev_get_drvdata(devptr);
 	char __iomem **vport = card->private_data;
@@ -684,7 +684,6 @@ static int snd_sc6000_remove(struct device *devptr, unsigned int dev)
 	release_region(mss_port[dev], 4);
 
 	snd_card_free(card);
-	return 0;
 }
 
 static struct isa_driver snd_sc6000_driver = {
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c
index 2e5a5c5279e8..e70ef9aee545 100644
--- a/sound/isa/sscape.c
+++ b/sound/isa/sscape.c
@@ -1183,10 +1183,9 @@ static int snd_sscape_probe(struct device *pdev, unsigned int dev)
 	return ret;
 }
 
-static int snd_sscape_remove(struct device *devptr, unsigned int dev)
+static void snd_sscape_remove(struct device *devptr, unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 #define DEV_NAME "sscape"
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c
index 9e0f6b226775..b750a4fd40de 100644
--- a/sound/isa/wavefront/wavefront.c
+++ b/sound/isa/wavefront/wavefront.c
@@ -565,11 +565,10 @@ static int snd_wavefront_isa_probe(struct device *pdev,
 	return 0;
 }
 
-static int snd_wavefront_isa_remove(struct device *devptr,
+static void snd_wavefront_isa_remove(struct device *devptr,
 				    unsigned int dev)
 {
 	snd_card_free(dev_get_drvdata(devptr));
-	return 0;
 }
 
 #define DEV_NAME "wavefront"
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 1/2] watchdog: pcwd: drop always-false if from remove callback
  2021-01-21 20:48 ` [PATCH v1 1/2] watchdog: pcwd: drop always-false if from remove callback Uwe Kleine-König
@ 2021-01-21 23:08   ` Guenter Roeck
  0 siblings, 0 replies; 18+ messages in thread
From: Guenter Roeck @ 2021-01-21 23:08 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Wim Van Sebroeck, William Breathitt Gray, Greg Kroah-Hartman,
	linux-watchdog, linux-kernel

On Thu, Jan 21, 2021 at 09:48:11PM +0100, Uwe Kleine-König wrote:
> If pcwd_isa_probe() succeeded pcwd_private.io_addr cannot be NULL. (And
> if pcwd_isa_probe() failed, pcwd_isa_remove() isn't called.)
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>

Acked-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/pcwd.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/watchdog/pcwd.c b/drivers/watchdog/pcwd.c
> index e86fa7f8351d..b95cd38f3ceb 100644
> --- a/drivers/watchdog/pcwd.c
> +++ b/drivers/watchdog/pcwd.c
> @@ -956,9 +956,6 @@ static int pcwd_isa_remove(struct device *dev, unsigned int id)
>  	if (debug >= DEBUG)
>  		pr_debug("pcwd_isa_remove id=%d\n", id);
>  
> -	if (!pcwd_private.io_addr)
> -		return 1;
> -
>  	/*  Disable the board  */
>  	if (!nowayout)
>  		pcwd_stop();
> -- 
> 2.29.2
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 0/2] isa: Make the remove callback for isa drivers return void
  2021-01-21 20:48 ` Uwe Kleine-König
@ 2021-01-22  1:03   ` William Breathitt Gray
  -1 siblings, 0 replies; 18+ messages in thread
From: William Breathitt Gray @ 2021-01-22  1:03 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Wim Van Sebroeck, Guenter Roeck, Greg Kroah-Hartman,
	Rafael J. Wysocki, Pau Oliva Fora, Dmitry Torokhov,
	Mauro Carvalho Chehab, Wolfgang Grandegger, Marc Kleine-Budde,
	David S. Miller, Jakub Kicinski, Matthew Wilcox, Hannes Reinecke,
	James E.J. Bottomley, Martin K. Petersen, Finn Thain,
	Michael Schmitz, Jaroslav Kysela, Takashi Iwai, linux-watchdog,
	linux-kernel, linux-i2c, linux-input, linux-media, linux-can,
	netdev, linux-scsi, alsa-devel

[-- Attachment #1: Type: text/plain, Size: 2823 bytes --]

On Thu, Jan 21, 2021 at 09:48:10PM +0100, Uwe Kleine-König wrote:
> Hello,
> 
> as described in the commit log of the 2nd patch returning an error code
> from a bus' remove callback doesn't make any difference as the driver
> core ignores it and still considers the device removed.
> 
> So change the remove callback to return void to not give driver authors
> an incentive to believe they could return an error.
> 
> There is only a single isa driver in the tree (assuming I didn't miss
> any) that has a remove callback that can return a non zero return code.
> This is "fixed" in the first patch, to make the second patch more
> obviously correct.
> 
> Best regards
> Uwe
> 
> Uwe Kleine-König (2):
>   watchdog: pcwd: drop always-false if from remove callback
>   isa: Make the remove callback for isa drivers return void
> 
>  drivers/base/isa.c                   | 2 +-
>  drivers/i2c/busses/i2c-elektor.c     | 4 +---
>  drivers/i2c/busses/i2c-pca-isa.c     | 4 +---
>  drivers/input/touchscreen/htcpen.c   | 4 +---
>  drivers/media/radio/radio-sf16fmr2.c | 4 +---
>  drivers/net/can/sja1000/tscan1.c     | 4 +---
>  drivers/net/ethernet/3com/3c509.c    | 3 +--
>  drivers/scsi/advansys.c              | 3 +--
>  drivers/scsi/aha1542.c               | 3 +--
>  drivers/scsi/fdomain_isa.c           | 3 +--
>  drivers/scsi/g_NCR5380.c             | 3 +--
>  drivers/watchdog/pcwd.c              | 7 +------
>  include/linux/isa.h                  | 2 +-
>  sound/isa/ad1848/ad1848.c            | 3 +--
>  sound/isa/adlib.c                    | 3 +--
>  sound/isa/cmi8328.c                  | 3 +--
>  sound/isa/cmi8330.c                  | 3 +--
>  sound/isa/cs423x/cs4231.c            | 3 +--
>  sound/isa/cs423x/cs4236.c            | 3 +--
>  sound/isa/es1688/es1688.c            | 3 +--
>  sound/isa/es18xx.c                   | 3 +--
>  sound/isa/galaxy/galaxy.c            | 3 +--
>  sound/isa/gus/gusclassic.c           | 3 +--
>  sound/isa/gus/gusextreme.c           | 3 +--
>  sound/isa/gus/gusmax.c               | 3 +--
>  sound/isa/gus/interwave.c            | 3 +--
>  sound/isa/msnd/msnd_pinnacle.c       | 3 +--
>  sound/isa/opl3sa2.c                  | 3 +--
>  sound/isa/opti9xx/miro.c             | 3 +--
>  sound/isa/opti9xx/opti92x-ad1848.c   | 3 +--
>  sound/isa/sb/jazz16.c                | 3 +--
>  sound/isa/sb/sb16.c                  | 3 +--
>  sound/isa/sb/sb8.c                   | 3 +--
>  sound/isa/sc6000.c                   | 3 +--
>  sound/isa/sscape.c                   | 3 +--
>  sound/isa/wavefront/wavefront.c      | 3 +--
>  36 files changed, 36 insertions(+), 79 deletions(-)
> 
> 
> base-commit: 5a158981aafa7f29709034b17bd007b15cb29983
> -- 
> 2.29.2

Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 0/2] isa: Make the remove callback for isa drivers return void
@ 2021-01-22  1:03   ` William Breathitt Gray
  0 siblings, 0 replies; 18+ messages in thread
From: William Breathitt Gray @ 2021-01-22  1:03 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: alsa-devel, Rafael J. Wysocki, Takashi Iwai, linux-i2c,
	Hannes Reinecke, Wim Van Sebroeck, linux-scsi, Matthew Wilcox,
	linux-input, Pau Oliva Fora, Jakub Kicinski, Wolfgang Grandegger,
	linux-media, linux-watchdog, James E.J. Bottomley, linux-can,
	Marc Kleine-Budde, Mauro Carvalho Chehab, Finn Thain,
	Michael Schmitz, Martin K. Petersen, Greg Kroah-Hartman,
	Dmitry Torokhov, linux-kernel, Guenter Roeck, netdev,
	David S. Miller

[-- Attachment #1: Type: text/plain, Size: 2823 bytes --]

On Thu, Jan 21, 2021 at 09:48:10PM +0100, Uwe Kleine-König wrote:
> Hello,
> 
> as described in the commit log of the 2nd patch returning an error code
> from a bus' remove callback doesn't make any difference as the driver
> core ignores it and still considers the device removed.
> 
> So change the remove callback to return void to not give driver authors
> an incentive to believe they could return an error.
> 
> There is only a single isa driver in the tree (assuming I didn't miss
> any) that has a remove callback that can return a non zero return code.
> This is "fixed" in the first patch, to make the second patch more
> obviously correct.
> 
> Best regards
> Uwe
> 
> Uwe Kleine-König (2):
>   watchdog: pcwd: drop always-false if from remove callback
>   isa: Make the remove callback for isa drivers return void
> 
>  drivers/base/isa.c                   | 2 +-
>  drivers/i2c/busses/i2c-elektor.c     | 4 +---
>  drivers/i2c/busses/i2c-pca-isa.c     | 4 +---
>  drivers/input/touchscreen/htcpen.c   | 4 +---
>  drivers/media/radio/radio-sf16fmr2.c | 4 +---
>  drivers/net/can/sja1000/tscan1.c     | 4 +---
>  drivers/net/ethernet/3com/3c509.c    | 3 +--
>  drivers/scsi/advansys.c              | 3 +--
>  drivers/scsi/aha1542.c               | 3 +--
>  drivers/scsi/fdomain_isa.c           | 3 +--
>  drivers/scsi/g_NCR5380.c             | 3 +--
>  drivers/watchdog/pcwd.c              | 7 +------
>  include/linux/isa.h                  | 2 +-
>  sound/isa/ad1848/ad1848.c            | 3 +--
>  sound/isa/adlib.c                    | 3 +--
>  sound/isa/cmi8328.c                  | 3 +--
>  sound/isa/cmi8330.c                  | 3 +--
>  sound/isa/cs423x/cs4231.c            | 3 +--
>  sound/isa/cs423x/cs4236.c            | 3 +--
>  sound/isa/es1688/es1688.c            | 3 +--
>  sound/isa/es18xx.c                   | 3 +--
>  sound/isa/galaxy/galaxy.c            | 3 +--
>  sound/isa/gus/gusclassic.c           | 3 +--
>  sound/isa/gus/gusextreme.c           | 3 +--
>  sound/isa/gus/gusmax.c               | 3 +--
>  sound/isa/gus/interwave.c            | 3 +--
>  sound/isa/msnd/msnd_pinnacle.c       | 3 +--
>  sound/isa/opl3sa2.c                  | 3 +--
>  sound/isa/opti9xx/miro.c             | 3 +--
>  sound/isa/opti9xx/opti92x-ad1848.c   | 3 +--
>  sound/isa/sb/jazz16.c                | 3 +--
>  sound/isa/sb/sb16.c                  | 3 +--
>  sound/isa/sb/sb8.c                   | 3 +--
>  sound/isa/sc6000.c                   | 3 +--
>  sound/isa/sscape.c                   | 3 +--
>  sound/isa/wavefront/wavefront.c      | 3 +--
>  36 files changed, 36 insertions(+), 79 deletions(-)
> 
> 
> base-commit: 5a158981aafa7f29709034b17bd007b15cb29983
> -- 
> 2.29.2

Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 2/2] isa: Make the remove callback for isa drivers return void
  2021-01-21 20:48   ` Uwe Kleine-König
@ 2021-01-22  3:34     ` kernel test robot
  -1 siblings, 0 replies; 18+ messages in thread
From: kernel test robot @ 2021-01-22  3:34 UTC (permalink / raw)
  To: Uwe Kleine-König, Wim Van Sebroeck, Guenter Roeck,
	William Breathitt Gray, Greg Kroah-Hartman, Rafael J. Wysocki,
	Pau Oliva Fora, Dmitry Torokhov, Mauro Carvalho Chehab,
	Wolfgang Grandegger
  Cc: kbuild-all, linux-media

[-- Attachment #1: Type: text/plain, Size: 5631 bytes --]

Hi "Uwe,

I love your patch! Yet something to improve:

[auto build test ERROR on 5a158981aafa7f29709034b17bd007b15cb29983]

url:    https://github.com/0day-ci/linux/commits/Uwe-Kleine-K-nig/isa-Make-the-remove-callback-for-isa-drivers-return-void/20210122-051235
base:    5a158981aafa7f29709034b17bd007b15cb29983
config: arm-randconfig-r016-20210121 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/0c93d705d2694019f3139d838eb6b48696c4f6dd
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Uwe-Kleine-K-nig/isa-Make-the-remove-callback-for-isa-drivers-return-void/20210122-051235
        git checkout 0c93d705d2694019f3139d838eb6b48696c4f6dd
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/media/radio/radio-aztech.c:134:14: error: initialization of 'void (*)(struct device *, unsigned int)' from incompatible pointer type 'int (*)(struct device *, unsigned int)' [-Werror=incompatible-pointer-types]
     134 |   .remove  = radio_isa_remove,
         |              ^~~~~~~~~~~~~~~~
   drivers/media/radio/radio-aztech.c:134:14: note: (near initialization for 'aztech_driver.driver.remove')
   cc1: some warnings being treated as errors
--
>> drivers/media/radio/radio-rtrack2.c:116:14: error: initialization of 'void (*)(struct device *, unsigned int)' from incompatible pointer type 'int (*)(struct device *, unsigned int)' [-Werror=incompatible-pointer-types]
     116 |   .remove  = radio_isa_remove,
         |              ^~~~~~~~~~~~~~~~
   drivers/media/radio/radio-rtrack2.c:116:14: note: (near initialization for 'rtrack2_driver.driver.remove')
   cc1: some warnings being treated as errors
--
>> drivers/media/radio/radio-typhoon.c:145:14: error: initialization of 'void (*)(struct device *, unsigned int)' from incompatible pointer type 'int (*)(struct device *, unsigned int)' [-Werror=incompatible-pointer-types]
     145 |   .remove  = radio_isa_remove,
         |              ^~~~~~~~~~~~~~~~
   drivers/media/radio/radio-typhoon.c:145:14: note: (near initialization for 'typhoon_driver.driver.remove')
   cc1: some warnings being treated as errors
--
>> drivers/media/radio/radio-zoltrix.c:221:14: error: initialization of 'void (*)(struct device *, unsigned int)' from incompatible pointer type 'int (*)(struct device *, unsigned int)' [-Werror=incompatible-pointer-types]
     221 |   .remove  = radio_isa_remove,
         |              ^~~~~~~~~~~~~~~~
   drivers/media/radio/radio-zoltrix.c:221:14: note: (near initialization for 'zoltrix_driver.driver.remove')
   cc1: some warnings being treated as errors
--
>> drivers/media/radio/radio-gemtek.c:298:14: error: initialization of 'void (*)(struct device *, unsigned int)' from incompatible pointer type 'int (*)(struct device *, unsigned int)' [-Werror=incompatible-pointer-types]
     298 |   .remove  = radio_isa_remove,
         |              ^~~~~~~~~~~~~~~~
   drivers/media/radio/radio-gemtek.c:298:14: note: (near initialization for 'gemtek_driver.driver.remove')
   cc1: some warnings being treated as errors
--
>> drivers/media/radio/radio-trust.c:216:14: error: initialization of 'void (*)(struct device *, unsigned int)' from incompatible pointer type 'int (*)(struct device *, unsigned int)' [-Werror=incompatible-pointer-types]
     216 |   .remove  = radio_isa_remove,
         |              ^~~~~~~~~~~~~~~~
   drivers/media/radio/radio-trust.c:216:14: note: (near initialization for 'trust_driver.driver.remove')
   cc1: some warnings being treated as errors


vim +134 drivers/media/radio/radio-aztech.c

3088fba877ee8bf2 Hans Verkuil   2012-01-16  129  
3088fba877ee8bf2 Hans Verkuil   2012-01-16  130  static struct radio_isa_driver aztech_driver = {
3088fba877ee8bf2 Hans Verkuil   2012-01-16  131  	.driver = {
3088fba877ee8bf2 Hans Verkuil   2012-01-16  132  		.match		= radio_isa_match,
3088fba877ee8bf2 Hans Verkuil   2012-01-16  133  		.probe		= radio_isa_probe,
3088fba877ee8bf2 Hans Verkuil   2012-01-16 @134  		.remove		= radio_isa_remove,
3088fba877ee8bf2 Hans Verkuil   2012-01-16  135  		.driver		= {
3088fba877ee8bf2 Hans Verkuil   2012-01-16  136  			.name	= "radio-aztech",
3088fba877ee8bf2 Hans Verkuil   2012-01-16  137  		},
3088fba877ee8bf2 Hans Verkuil   2012-01-16  138  	},
3088fba877ee8bf2 Hans Verkuil   2012-01-16  139  	.io_params = io,
3088fba877ee8bf2 Hans Verkuil   2012-01-16  140  	.radio_nr_params = radio_nr,
3088fba877ee8bf2 Hans Verkuil   2012-01-16  141  	.io_ports = aztech_ioports,
3088fba877ee8bf2 Hans Verkuil   2012-01-16  142  	.num_of_io_ports = ARRAY_SIZE(aztech_ioports),
eb27fafef69568a8 Ondrej Zary    2013-07-19  143  	.region_size = 8,
3088fba877ee8bf2 Hans Verkuil   2012-01-16  144  	.card = "Aztech Radio",
3088fba877ee8bf2 Hans Verkuil   2012-01-16  145  	.ops = &aztech_ops,
3088fba877ee8bf2 Hans Verkuil   2012-01-16  146  	.has_stereo = true,
3088fba877ee8bf2 Hans Verkuil   2012-01-16  147  	.max_volume = 3,
^1da177e4c3f4152 Linus Torvalds 2005-04-16  148  };
^1da177e4c3f4152 Linus Torvalds 2005-04-16  149  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35550 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 2/2] isa: Make the remove callback for isa drivers return void
@ 2021-01-22  3:34     ` kernel test robot
  0 siblings, 0 replies; 18+ messages in thread
From: kernel test robot @ 2021-01-22  3:34 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5722 bytes --]

Hi "Uwe,

I love your patch! Yet something to improve:

[auto build test ERROR on 5a158981aafa7f29709034b17bd007b15cb29983]

url:    https://github.com/0day-ci/linux/commits/Uwe-Kleine-K-nig/isa-Make-the-remove-callback-for-isa-drivers-return-void/20210122-051235
base:    5a158981aafa7f29709034b17bd007b15cb29983
config: arm-randconfig-r016-20210121 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/0c93d705d2694019f3139d838eb6b48696c4f6dd
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Uwe-Kleine-K-nig/isa-Make-the-remove-callback-for-isa-drivers-return-void/20210122-051235
        git checkout 0c93d705d2694019f3139d838eb6b48696c4f6dd
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/media/radio/radio-aztech.c:134:14: error: initialization of 'void (*)(struct device *, unsigned int)' from incompatible pointer type 'int (*)(struct device *, unsigned int)' [-Werror=incompatible-pointer-types]
     134 |   .remove  = radio_isa_remove,
         |              ^~~~~~~~~~~~~~~~
   drivers/media/radio/radio-aztech.c:134:14: note: (near initialization for 'aztech_driver.driver.remove')
   cc1: some warnings being treated as errors
--
>> drivers/media/radio/radio-rtrack2.c:116:14: error: initialization of 'void (*)(struct device *, unsigned int)' from incompatible pointer type 'int (*)(struct device *, unsigned int)' [-Werror=incompatible-pointer-types]
     116 |   .remove  = radio_isa_remove,
         |              ^~~~~~~~~~~~~~~~
   drivers/media/radio/radio-rtrack2.c:116:14: note: (near initialization for 'rtrack2_driver.driver.remove')
   cc1: some warnings being treated as errors
--
>> drivers/media/radio/radio-typhoon.c:145:14: error: initialization of 'void (*)(struct device *, unsigned int)' from incompatible pointer type 'int (*)(struct device *, unsigned int)' [-Werror=incompatible-pointer-types]
     145 |   .remove  = radio_isa_remove,
         |              ^~~~~~~~~~~~~~~~
   drivers/media/radio/radio-typhoon.c:145:14: note: (near initialization for 'typhoon_driver.driver.remove')
   cc1: some warnings being treated as errors
--
>> drivers/media/radio/radio-zoltrix.c:221:14: error: initialization of 'void (*)(struct device *, unsigned int)' from incompatible pointer type 'int (*)(struct device *, unsigned int)' [-Werror=incompatible-pointer-types]
     221 |   .remove  = radio_isa_remove,
         |              ^~~~~~~~~~~~~~~~
   drivers/media/radio/radio-zoltrix.c:221:14: note: (near initialization for 'zoltrix_driver.driver.remove')
   cc1: some warnings being treated as errors
--
>> drivers/media/radio/radio-gemtek.c:298:14: error: initialization of 'void (*)(struct device *, unsigned int)' from incompatible pointer type 'int (*)(struct device *, unsigned int)' [-Werror=incompatible-pointer-types]
     298 |   .remove  = radio_isa_remove,
         |              ^~~~~~~~~~~~~~~~
   drivers/media/radio/radio-gemtek.c:298:14: note: (near initialization for 'gemtek_driver.driver.remove')
   cc1: some warnings being treated as errors
--
>> drivers/media/radio/radio-trust.c:216:14: error: initialization of 'void (*)(struct device *, unsigned int)' from incompatible pointer type 'int (*)(struct device *, unsigned int)' [-Werror=incompatible-pointer-types]
     216 |   .remove  = radio_isa_remove,
         |              ^~~~~~~~~~~~~~~~
   drivers/media/radio/radio-trust.c:216:14: note: (near initialization for 'trust_driver.driver.remove')
   cc1: some warnings being treated as errors


vim +134 drivers/media/radio/radio-aztech.c

3088fba877ee8bf2 Hans Verkuil   2012-01-16  129  
3088fba877ee8bf2 Hans Verkuil   2012-01-16  130  static struct radio_isa_driver aztech_driver = {
3088fba877ee8bf2 Hans Verkuil   2012-01-16  131  	.driver = {
3088fba877ee8bf2 Hans Verkuil   2012-01-16  132  		.match		= radio_isa_match,
3088fba877ee8bf2 Hans Verkuil   2012-01-16  133  		.probe		= radio_isa_probe,
3088fba877ee8bf2 Hans Verkuil   2012-01-16 @134  		.remove		= radio_isa_remove,
3088fba877ee8bf2 Hans Verkuil   2012-01-16  135  		.driver		= {
3088fba877ee8bf2 Hans Verkuil   2012-01-16  136  			.name	= "radio-aztech",
3088fba877ee8bf2 Hans Verkuil   2012-01-16  137  		},
3088fba877ee8bf2 Hans Verkuil   2012-01-16  138  	},
3088fba877ee8bf2 Hans Verkuil   2012-01-16  139  	.io_params = io,
3088fba877ee8bf2 Hans Verkuil   2012-01-16  140  	.radio_nr_params = radio_nr,
3088fba877ee8bf2 Hans Verkuil   2012-01-16  141  	.io_ports = aztech_ioports,
3088fba877ee8bf2 Hans Verkuil   2012-01-16  142  	.num_of_io_ports = ARRAY_SIZE(aztech_ioports),
eb27fafef69568a8 Ondrej Zary    2013-07-19  143  	.region_size = 8,
3088fba877ee8bf2 Hans Verkuil   2012-01-16  144  	.card = "Aztech Radio",
3088fba877ee8bf2 Hans Verkuil   2012-01-16  145  	.ops = &aztech_ops,
3088fba877ee8bf2 Hans Verkuil   2012-01-16  146  	.has_stereo = true,
3088fba877ee8bf2 Hans Verkuil   2012-01-16  147  	.max_volume = 3,
^1da177e4c3f4152 Linus Torvalds 2005-04-16  148  };
^1da177e4c3f4152 Linus Torvalds 2005-04-16  149  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35550 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 2/2] isa: Make the remove callback for isa drivers return void
  2021-01-21 20:48   ` Uwe Kleine-König
@ 2021-01-22  3:48     ` kernel test robot
  -1 siblings, 0 replies; 18+ messages in thread
From: kernel test robot @ 2021-01-22  3:48 UTC (permalink / raw)
  To: Uwe Kleine-König, Wim Van Sebroeck, Guenter Roeck,
	William Breathitt Gray, Greg Kroah-Hartman, Rafael J. Wysocki,
	Pau Oliva Fora, Dmitry Torokhov, Mauro Carvalho Chehab,
	Wolfgang Grandegger
  Cc: kbuild-all, linux-media

[-- Attachment #1: Type: text/plain, Size: 3342 bytes --]

Hi "Uwe,

I love your patch! Yet something to improve:

[auto build test ERROR on 5a158981aafa7f29709034b17bd007b15cb29983]

url:    https://github.com/0day-ci/linux/commits/Uwe-Kleine-K-nig/isa-Make-the-remove-callback-for-isa-drivers-return-void/20210122-051235
base:    5a158981aafa7f29709034b17bd007b15cb29983
config: nios2-randconfig-r023-20210121 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/0c93d705d2694019f3139d838eb6b48696c4f6dd
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Uwe-Kleine-K-nig/isa-Make-the-remove-callback-for-isa-drivers-return-void/20210122-051235
        git checkout 0c93d705d2694019f3139d838eb6b48696c4f6dd
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/media/radio/radio-terratec.c:143:14: error: initialization of 'void (*)(struct device *, unsigned int)' from incompatible pointer type 'int (*)(struct device *, unsigned int)' [-Werror=incompatible-pointer-types]
     143 |   .remove  = radio_isa_remove,
         |              ^~~~~~~~~~~~~~~~
   drivers/media/radio/radio-terratec.c:143:14: note: (near initialization for 'terratec_driver.driver.remove')
   cc1: some warnings being treated as errors


vim +143 drivers/media/radio/radio-terratec.c

32c518364a03d336 Hans Verkuil   2012-01-16  138  
32c518364a03d336 Hans Verkuil   2012-01-16  139  static struct radio_isa_driver terratec_driver = {
32c518364a03d336 Hans Verkuil   2012-01-16  140  	.driver = {
32c518364a03d336 Hans Verkuil   2012-01-16  141  		.match		= radio_isa_match,
32c518364a03d336 Hans Verkuil   2012-01-16  142  		.probe		= radio_isa_probe,
32c518364a03d336 Hans Verkuil   2012-01-16 @143  		.remove		= radio_isa_remove,
32c518364a03d336 Hans Verkuil   2012-01-16  144  		.driver		= {
32c518364a03d336 Hans Verkuil   2012-01-16  145  			.name	= "radio-terratec",
32c518364a03d336 Hans Verkuil   2012-01-16  146  		},
32c518364a03d336 Hans Verkuil   2012-01-16  147  	},
32c518364a03d336 Hans Verkuil   2012-01-16  148  	.io_params = &io,
32c518364a03d336 Hans Verkuil   2012-01-16  149  	.radio_nr_params = &radio_nr,
32c518364a03d336 Hans Verkuil   2012-01-16  150  	.io_ports = terratec_ioports,
32c518364a03d336 Hans Verkuil   2012-01-16  151  	.num_of_io_ports = ARRAY_SIZE(terratec_ioports),
32c518364a03d336 Hans Verkuil   2012-01-16  152  	.region_size = 2,
32c518364a03d336 Hans Verkuil   2012-01-16  153  	.card = "TerraTec ActiveRadio",
32c518364a03d336 Hans Verkuil   2012-01-16  154  	.ops = &terratec_ops,
32c518364a03d336 Hans Verkuil   2012-01-16  155  	.has_stereo = true,
32c518364a03d336 Hans Verkuil   2012-01-16  156  	.max_volume = 10,
^1da177e4c3f4152 Linus Torvalds 2005-04-16  157  };
^1da177e4c3f4152 Linus Torvalds 2005-04-16  158  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25787 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 2/2] isa: Make the remove callback for isa drivers return void
@ 2021-01-22  3:48     ` kernel test robot
  0 siblings, 0 replies; 18+ messages in thread
From: kernel test robot @ 2021-01-22  3:48 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3403 bytes --]

Hi "Uwe,

I love your patch! Yet something to improve:

[auto build test ERROR on 5a158981aafa7f29709034b17bd007b15cb29983]

url:    https://github.com/0day-ci/linux/commits/Uwe-Kleine-K-nig/isa-Make-the-remove-callback-for-isa-drivers-return-void/20210122-051235
base:    5a158981aafa7f29709034b17bd007b15cb29983
config: nios2-randconfig-r023-20210121 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/0c93d705d2694019f3139d838eb6b48696c4f6dd
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Uwe-Kleine-K-nig/isa-Make-the-remove-callback-for-isa-drivers-return-void/20210122-051235
        git checkout 0c93d705d2694019f3139d838eb6b48696c4f6dd
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/media/radio/radio-terratec.c:143:14: error: initialization of 'void (*)(struct device *, unsigned int)' from incompatible pointer type 'int (*)(struct device *, unsigned int)' [-Werror=incompatible-pointer-types]
     143 |   .remove  = radio_isa_remove,
         |              ^~~~~~~~~~~~~~~~
   drivers/media/radio/radio-terratec.c:143:14: note: (near initialization for 'terratec_driver.driver.remove')
   cc1: some warnings being treated as errors


vim +143 drivers/media/radio/radio-terratec.c

32c518364a03d336 Hans Verkuil   2012-01-16  138  
32c518364a03d336 Hans Verkuil   2012-01-16  139  static struct radio_isa_driver terratec_driver = {
32c518364a03d336 Hans Verkuil   2012-01-16  140  	.driver = {
32c518364a03d336 Hans Verkuil   2012-01-16  141  		.match		= radio_isa_match,
32c518364a03d336 Hans Verkuil   2012-01-16  142  		.probe		= radio_isa_probe,
32c518364a03d336 Hans Verkuil   2012-01-16 @143  		.remove		= radio_isa_remove,
32c518364a03d336 Hans Verkuil   2012-01-16  144  		.driver		= {
32c518364a03d336 Hans Verkuil   2012-01-16  145  			.name	= "radio-terratec",
32c518364a03d336 Hans Verkuil   2012-01-16  146  		},
32c518364a03d336 Hans Verkuil   2012-01-16  147  	},
32c518364a03d336 Hans Verkuil   2012-01-16  148  	.io_params = &io,
32c518364a03d336 Hans Verkuil   2012-01-16  149  	.radio_nr_params = &radio_nr,
32c518364a03d336 Hans Verkuil   2012-01-16  150  	.io_ports = terratec_ioports,
32c518364a03d336 Hans Verkuil   2012-01-16  151  	.num_of_io_ports = ARRAY_SIZE(terratec_ioports),
32c518364a03d336 Hans Verkuil   2012-01-16  152  	.region_size = 2,
32c518364a03d336 Hans Verkuil   2012-01-16  153  	.card = "TerraTec ActiveRadio",
32c518364a03d336 Hans Verkuil   2012-01-16  154  	.ops = &terratec_ops,
32c518364a03d336 Hans Verkuil   2012-01-16  155  	.has_stereo = true,
32c518364a03d336 Hans Verkuil   2012-01-16  156  	.max_volume = 10,
^1da177e4c3f4152 Linus Torvalds 2005-04-16  157  };
^1da177e4c3f4152 Linus Torvalds 2005-04-16  158  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 25787 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 2/2] isa: Make the remove callback for isa drivers return void
  2021-01-21 20:48   ` Uwe Kleine-König
@ 2021-01-22  7:34     ` Marc Kleine-Budde
  -1 siblings, 0 replies; 18+ messages in thread
From: Marc Kleine-Budde @ 2021-01-22  7:34 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Wim Van Sebroeck, Guenter Roeck, William Breathitt Gray,
	Greg Kroah-Hartman, Rafael J. Wysocki, Pau Oliva Fora,
	Dmitry Torokhov, Mauro Carvalho Chehab, Wolfgang Grandegger,
	David S. Miller, Jakub Kicinski, Matthew Wilcox, Hannes Reinecke,
	James E.J. Bottomley, Martin K. Petersen, Finn Thain,
	Michael Schmitz, Jaroslav Kysela, Takashi Iwai, linux-watchdog,
	linux-kernel, linux-i2c, linux-input, linux-media, linux-can,
	netdev, linux-scsi, alsa-devel

[-- Attachment #1: Type: text/plain, Size: 782 bytes --]

On Thu, Jan 21, 2021 at 09:48:12PM +0100, Uwe Kleine-König wrote:
> The driver core ignores the return value of the remove callback, so
> don't give isa drivers the chance to provide a value.
> 
> Adapt all isa_drivers with a remove callbacks accordingly; they all
> return 0 unconditionally anyhow.
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> ---
>  drivers/net/can/sja1000/tscan1.c     | 4 +---

For the can driver:

Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 2/2] isa: Make the remove callback for isa drivers return void
@ 2021-01-22  7:34     ` Marc Kleine-Budde
  0 siblings, 0 replies; 18+ messages in thread
From: Marc Kleine-Budde @ 2021-01-22  7:34 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: alsa-devel, Rafael J. Wysocki, linux-i2c, Hannes Reinecke,
	Wim Van Sebroeck, linux-scsi, Takashi Iwai, Matthew Wilcox,
	linux-input, Pau Oliva Fora, Jakub Kicinski, Wolfgang Grandegger,
	linux-media, linux-watchdog, James E.J. Bottomley,
	William Breathitt Gray, linux-can, Mauro Carvalho Chehab,
	Finn Thain, Michael Schmitz, Martin K. Petersen,
	Greg Kroah-Hartman, Dmitry Torokhov, linux-kernel, Guenter Roeck,
	netdev, David S. Miller

[-- Attachment #1: Type: text/plain, Size: 782 bytes --]

On Thu, Jan 21, 2021 at 09:48:12PM +0100, Uwe Kleine-König wrote:
> The driver core ignores the return value of the remove callback, so
> don't give isa drivers the chance to provide a value.
> 
> Adapt all isa_drivers with a remove callbacks accordingly; they all
> return 0 unconditionally anyhow.
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> ---
>  drivers/net/can/sja1000/tscan1.c     | 4 +---

For the can driver:

Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 2/2] isa: Make the remove callback for isa drivers return void
  2021-01-21 20:48   ` Uwe Kleine-König
@ 2021-01-22  8:53     ` Wolfram Sang
  -1 siblings, 0 replies; 18+ messages in thread
From: Wolfram Sang @ 2021-01-22  8:53 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Wim Van Sebroeck, Guenter Roeck, William Breathitt Gray,
	Greg Kroah-Hartman, Rafael J. Wysocki, Pau Oliva Fora,
	Dmitry Torokhov, Mauro Carvalho Chehab, Wolfgang Grandegger,
	Marc Kleine-Budde, David S. Miller, Jakub Kicinski,
	Matthew Wilcox, Hannes Reinecke, James E.J. Bottomley,
	Martin K. Petersen, Finn Thain, Michael Schmitz, Jaroslav Kysela,
	Takashi Iwai, linux-watchdog, linux-kernel, linux-i2c,
	linux-input, linux-media, linux-can, netdev, linux-scsi,
	alsa-devel

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

On Thu, Jan 21, 2021 at 09:48:12PM +0100, Uwe Kleine-König wrote:
> The driver core ignores the return value of the remove callback, so
> don't give isa drivers the chance to provide a value.
> 
> Adapt all isa_drivers with a remove callbacks accordingly; they all
> return 0 unconditionally anyhow.
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>

Acked-by: Wolfram Sang <wsa@kernel.org> # for I2C


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 2/2] isa: Make the remove callback for isa drivers return void
@ 2021-01-22  8:53     ` Wolfram Sang
  0 siblings, 0 replies; 18+ messages in thread
From: Wolfram Sang @ 2021-01-22  8:53 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: alsa-devel, Rafael J. Wysocki, Finn Thain, Hannes Reinecke,
	Wim Van Sebroeck, linux-scsi, Takashi Iwai, Matthew Wilcox,
	linux-input, Pau Oliva Fora, Jakub Kicinski, Wolfgang Grandegger,
	linux-media, linux-watchdog, James E.J. Bottomley,
	William Breathitt Gray, linux-can, Marc Kleine-Budde,
	Mauro Carvalho Chehab, Michael Schmitz, Martin K. Petersen,
	Greg Kroah-Hartman, Dmitry Torokhov, linux-kernel, Guenter Roeck,
	netdev, David S. Miller, linux-i2c

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

On Thu, Jan 21, 2021 at 09:48:12PM +0100, Uwe Kleine-König wrote:
> The driver core ignores the return value of the remove callback, so
> don't give isa drivers the chance to provide a value.
> 
> Adapt all isa_drivers with a remove callbacks accordingly; they all
> return 0 unconditionally anyhow.
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>

Acked-by: Wolfram Sang <wsa@kernel.org> # for I2C


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 2/2] isa: Make the remove callback for isa drivers return void
  2021-01-21 20:48   ` Uwe Kleine-König
@ 2021-01-22  9:01     ` Takashi Iwai
  -1 siblings, 0 replies; 18+ messages in thread
From: Takashi Iwai @ 2021-01-22  9:01 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Wim Van Sebroeck, Guenter Roeck, William Breathitt Gray,
	Greg Kroah-Hartman, Rafael J. Wysocki, Pau Oliva Fora,
	Dmitry Torokhov, Mauro Carvalho Chehab, Wolfgang Grandegger,
	Marc Kleine-Budde, David S. Miller, Jakub Kicinski,
	Matthew Wilcox, Hannes Reinecke, James E.J. Bottomley,
	Martin K. Petersen, Finn Thain, Michael Schmitz, Jaroslav Kysela,
	Takashi Iwai, linux-watchdog, linux-kernel, linux-i2c,
	linux-input, linux-media, linux-can, netdev, linux-scsi,
	alsa-devel

On Thu, 21 Jan 2021 21:48:12 +0100,
Uwe Kleine-König wrote:
> 
> The driver core ignores the return value of the remove callback, so
> don't give isa drivers the chance to provide a value.
> 
> Adapt all isa_drivers with a remove callbacks accordingly; they all
> return 0 unconditionally anyhow.
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>

For the sound/* changes:
Reviewed-by: Takashi Iwai <tiwai@suse.de>

BTW, how will we take the patches?
Judging from the LOCs, sound/* are mostly affected, so I may merge
them via sound.git tree, if other people have no objection.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v1 2/2] isa: Make the remove callback for isa drivers return void
@ 2021-01-22  9:01     ` Takashi Iwai
  0 siblings, 0 replies; 18+ messages in thread
From: Takashi Iwai @ 2021-01-22  9:01 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: alsa-devel, Rafael J. Wysocki, Finn Thain, Hannes Reinecke,
	Wim Van Sebroeck, linux-scsi, Takashi Iwai, Matthew Wilcox,
	linux-input, Pau Oliva Fora, Jakub Kicinski, Wolfgang Grandegger,
	linux-media, linux-watchdog, James E.J. Bottomley,
	William Breathitt Gray, linux-can, Marc Kleine-Budde,
	Mauro Carvalho Chehab, Michael Schmitz, Martin K. Petersen,
	Greg Kroah-Hartman, Dmitry Torokhov, linux-kernel, Guenter Roeck,
	netdev, David S. Miller, linux-i2c

On Thu, 21 Jan 2021 21:48:12 +0100,
Uwe Kleine-König wrote:
> 
> The driver core ignores the return value of the remove callback, so
> don't give isa drivers the chance to provide a value.
> 
> Adapt all isa_drivers with a remove callbacks accordingly; they all
> return 0 unconditionally anyhow.
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>

For the sound/* changes:
Reviewed-by: Takashi Iwai <tiwai@suse.de>

BTW, how will we take the patches?
Judging from the LOCs, sound/* are mostly affected, so I may merge
them via sound.git tree, if other people have no objection.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-01-22  9:25 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-21 20:48 [PATCH v1 0/2] isa: Make the remove callback for isa drivers return void Uwe Kleine-König
2021-01-21 20:48 ` Uwe Kleine-König
2021-01-21 20:48 ` [PATCH v1 1/2] watchdog: pcwd: drop always-false if from remove callback Uwe Kleine-König
2021-01-21 23:08   ` Guenter Roeck
2021-01-21 20:48 ` [PATCH v1 2/2] isa: Make the remove callback for isa drivers return void Uwe Kleine-König
2021-01-21 20:48   ` Uwe Kleine-König
2021-01-22  3:34   ` kernel test robot
2021-01-22  3:34     ` kernel test robot
2021-01-22  3:48   ` kernel test robot
2021-01-22  3:48     ` kernel test robot
2021-01-22  7:34   ` Marc Kleine-Budde
2021-01-22  7:34     ` Marc Kleine-Budde
2021-01-22  8:53   ` Wolfram Sang
2021-01-22  8:53     ` Wolfram Sang
2021-01-22  9:01   ` Takashi Iwai
2021-01-22  9:01     ` Takashi Iwai
2021-01-22  1:03 ` [PATCH v1 0/2] " William Breathitt Gray
2021-01-22  1:03   ` William Breathitt Gray

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.