Hello,
I already sent a similar series in January[1]. Apart from a general Ack
by Sam there was no reaction.
Now that there exists scripts/get_maintainer.pl, I resend an updated
series to an wider audience in the hope to get more feedback.
Best regards
Uwe
[1] http://thread.gmane.org/gmane.linux.kernel/779241
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
The function asic3_remove is used only wrapped by __devexit_p so define
it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: Samuel Ortiz <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: Yinghai Lu <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
---
drivers/mfd/asic3.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c
index 63a2a66..e22128c 100644
--- a/drivers/mfd/asic3.c
+++ b/drivers/mfd/asic3.c
@@ -908,7 +908,7 @@ static int __init asic3_probe(struct platform_device *pdev)
return ret;
}
-static int asic3_remove(struct platform_device *pdev)
+static int __devexit asic3_remove(struct platform_device *pdev)
{
int ret;
struct asic3 *asic = platform_get_drvdata(pdev);
--
1.6.4.3
The function atp870u_remove is used only wrapped by __devexit_p so define
it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: James E.J. Bottomley <[email protected]>
Cc: Yang Hongyang <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/scsi/atp870u.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c
index b137e56..1059167 100644
--- a/drivers/scsi/atp870u.c
+++ b/drivers/scsi/atp870u.c
@@ -3143,7 +3143,7 @@ static int atp870u_biosparam(struct scsi_device *disk, struct block_device *dev,
return 0;
}
-static void atp870u_remove (struct pci_dev *pdev)
+static void __devexit atp870u_remove (struct pci_dev *pdev)
{
struct atp_unit *devext = pci_get_drvdata(pdev);
struct Scsi_Host *pshost = devext->host;
--
1.6.4.3
The function bbc_remove is used only wrapped by __devexit_p so define it
using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/input/misc/sparcspkr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c
index c4f4231..5399dd2 100644
--- a/drivers/input/misc/sparcspkr.c
+++ b/drivers/input/misc/sparcspkr.c
@@ -230,7 +230,7 @@ out_err:
return err;
}
-static int bbc_remove(struct of_device *op)
+static int __devexit bbc_remove(struct of_device *op)
{
struct sparcspkr_state *state = dev_get_drvdata(&op->dev);
struct input_dev *input_dev = state->input_dev;
--
1.6.4.3
The function excite_nand_remove is defined using __exit, so don't use
__devexit_p but __exit_p to wrap it.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: Ming Lei <[email protected]>
Cc: Henrique de Moraes Holschuh <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: David Brownell <[email protected]>
Cc: [email protected]
---
drivers/mtd/nand/excite_nandflash.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/excite_nandflash.c b/drivers/mtd/nand/excite_nandflash.c
index 72446fb..630b4d6 100644
--- a/drivers/mtd/nand/excite_nandflash.c
+++ b/drivers/mtd/nand/excite_nandflash.c
@@ -224,7 +224,7 @@ static struct platform_driver excite_nand_driver = {
.owner = THIS_MODULE,
},
.probe = excite_nand_probe,
- .remove = __devexit_p(excite_nand_remove)
+ .remove = __exit_p(excite_nand_remove)
};
static int __init excite_nand_init(void)
--
1.6.4.3
The function grover_remove is used only wrapped by __devexit_p so define
it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/input/misc/sparcspkr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c
index 5399dd2..b064419 100644
--- a/drivers/input/misc/sparcspkr.c
+++ b/drivers/input/misc/sparcspkr.c
@@ -308,7 +308,7 @@ out_err:
return err;
}
-static int grover_remove(struct of_device *op)
+static int __devexit grover_remove(struct of_device *op)
{
struct sparcspkr_state *state = dev_get_drvdata(&op->dev);
struct grover_beep_info *info = &state->u.grover;
--
1.6.4.3
The function hal2_remove is defined using __exit, so don't use __devexit_p
but __exit_p to wrap it.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
sound/mips/hal2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c
index c52691c..72523a7 100644
--- a/sound/mips/hal2.c
+++ b/sound/mips/hal2.c
@@ -926,7 +926,7 @@ static int __exit hal2_remove(struct platform_device *pdev)
static struct platform_driver hal2_driver = {
.probe = hal2_probe,
- .remove = __devexit_p(hal2_remove),
+ .remove = __exit_p(hal2_remove),
.driver = {
.name = "sgihal2",
.owner = THIS_MODULE,
--
1.6.4.3
The function ilo_remove is used only wrapped by __devexit_p so define it
using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: David Altobelli <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
---
drivers/misc/hpilo.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c
index 1ad27c6..9ec007e 100644
--- a/drivers/misc/hpilo.c
+++ b/drivers/misc/hpilo.c
@@ -715,7 +715,7 @@ out:
return error;
}
-static void ilo_remove(struct pci_dev *pdev)
+static void __devexit ilo_remove(struct pci_dev *pdev)
{
int i, minor;
struct ilo_hwinfo *ilo_hw = pci_get_drvdata(pdev);
--
1.6.4.3
The function initio_remove_one is used only wrapped by __devexit_p so
define it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: James E.J. Bottomley <[email protected]>
Cc: Yang Hongyang <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/scsi/initio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c
index 89a5948..8bbfd99 100644
--- a/drivers/scsi/initio.c
+++ b/drivers/scsi/initio.c
@@ -2964,7 +2964,7 @@ out_disable_device:
* finished being used.
*/
-static void initio_remove_one(struct pci_dev *pdev)
+static void __devexit initio_remove_one(struct pci_dev *pdev)
{
struct Scsi_Host *host = pci_get_drvdata(pdev);
struct initio_host *s = (struct initio_host *)host->hostdata;
--
1.6.4.3
The function iodev_remove is defined using __exit, so don't use __devexit_p
but __exit_p to wrap it.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: Ming Lei <[email protected]>
Cc: Henrique de Moraes Holschuh <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: David Brownell <[email protected]>
Cc: [email protected]
---
arch/mips/basler/excite/excite_iodev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/mips/basler/excite/excite_iodev.c b/arch/mips/basler/excite/excite_iodev.c
index 938b1d0..5351b91 100644
--- a/arch/mips/basler/excite/excite_iodev.c
+++ b/arch/mips/basler/excite/excite_iodev.c
@@ -71,7 +71,7 @@ static struct platform_driver iodev_driver = {
.owner = THIS_MODULE,
},
.probe = iodev_probe,
- .remove = __devexit_p(iodev_remove),
+ .remove = __exit_p(iodev_remove),
};
--
1.6.4.3
The function lasi700_driver_remove is defined using __exit, so don't use
__devexit_p but __exit_p to wrap it.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: James E.J. Bottomley <[email protected]>
Cc: Yang Hongyang <[email protected]>
Cc: Kyle McMartin <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/scsi/lasi700.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/lasi700.c b/drivers/scsi/lasi700.c
index b3d3131..2991c81 100644
--- a/drivers/scsi/lasi700.c
+++ b/drivers/scsi/lasi700.c
@@ -167,7 +167,7 @@ static struct parisc_driver lasi700_driver = {
.name = "lasi_scsi",
.id_table = lasi700_ids,
.probe = lasi700_probe,
- .remove = __devexit_p(lasi700_driver_remove),
+ .remove = __exit_p(lasi700_driver_remove),
};
static int __init
--
1.6.4.3
The function mcf_remove is used only wrapped by __devexit_p so define it
using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: Greg Ungerer <[email protected]>
Cc: Len Sorensen <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: [email protected]
---
drivers/serial/mcf.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/serial/mcf.c b/drivers/serial/mcf.c
index b443824..7bb5fee 100644
--- a/drivers/serial/mcf.c
+++ b/drivers/serial/mcf.c
@@ -602,7 +602,7 @@ static int __devinit mcf_probe(struct platform_device *pdev)
/****************************************************************************/
-static int mcf_remove(struct platform_device *pdev)
+static int __devexit mcf_remove(struct platform_device *pdev)
{
struct uart_port *port;
int i;
--
1.6.4.3
The function megaraid_detach_one is used only wrapped by __devexit_p so
define it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: Neela Syam Kolli <[email protected]>
Cc: James E.J. Bottomley <[email protected]>
Cc: Yang Hongyang <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/scsi/megaraid/megaraid_mbox.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index 234f0b7..9fc9cf7 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -76,7 +76,7 @@ static int megaraid_init(void);
static void megaraid_exit(void);
static int megaraid_probe_one(struct pci_dev*, const struct pci_device_id *);
-static void megaraid_detach_one(struct pci_dev *);
+static void __devexit megaraid_detach_one(struct pci_dev *);
static void megaraid_mbox_shutdown(struct pci_dev *);
static int megaraid_io_attach(adapter_t *);
@@ -551,7 +551,7 @@ out_probe_one:
*
* This routine is also called from the PCI hotplug system.
*/
-static void
+static void __devexit
megaraid_detach_one(struct pci_dev *pdev)
{
adapter_t *adapter;
--
1.6.4.3
The function meth_remove is defined using __exit, so don't use __devexit_p
but __exit_p to wrap it.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Patrick McHardy <[email protected]>
Cc: Johannes Berg <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/net/meth.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/meth.c b/drivers/net/meth.c
index 92ceb68..2af8173 100644
--- a/drivers/net/meth.c
+++ b/drivers/net/meth.c
@@ -828,7 +828,7 @@ static int __exit meth_remove(struct platform_device *pdev)
static struct platform_driver meth_driver = {
.probe = meth_probe,
- .remove = __devexit_p(meth_remove),
+ .remove = __exit_p(meth_remove),
.driver = {
.name = "meth",
.owner = THIS_MODULE,
--
1.6.4.3
The function mlx4_remove_one is defined in .text, so there is no need to
wrap it with __devexit_p.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: Roland Dreier <[email protected]>
Cc: Yevgeny Petrilin <[email protected]>
Cc: Yang Hongyang <[email protected]>
Cc: Jack Morgenstein <[email protected]>
Cc: Eli Cohen <[email protected]>
Cc: [email protected]
---
drivers/net/mlx4/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
index 3dd481e..00625a7 100644
--- a/drivers/net/mlx4/main.c
+++ b/drivers/net/mlx4/main.c
@@ -1291,7 +1291,7 @@ static struct pci_driver mlx4_driver = {
.name = DRV_NAME,
.id_table = mlx4_pci_table,
.probe = mlx4_init_one,
- .remove = __devexit_p(mlx4_remove_one)
+ .remove = mlx4_remove_one
};
static int __init mlx4_verify_params(void)
--
1.6.4.3
The function mpc85xx_pci_err_remove is used only wrapped by __devexit_p
so define it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Doug Thompson <[email protected]>
Cc: Dave Jiang <[email protected]>
Cc: Kumar Gala <[email protected]>
Cc: Yang Shi <[email protected]>
Cc: [email protected]
---
drivers/edac/mpc85xx_edac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index 157f650..ce6d759 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -304,7 +304,7 @@ err:
return res;
}
-static int mpc85xx_pci_err_remove(struct of_device *op)
+static int __devexit mpc85xx_pci_err_remove(struct of_device *op)
{
struct edac_pci_ctl_info *pci = dev_get_drvdata(&op->dev);
struct mpc85xx_pci_pdata *pdata = pci->pvt_info;
--
1.6.4.3
The function mv64x60_pci_err_remove is used only wrapped by __devexit_p
so define it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
---
drivers/edac/mv64x60_edac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/edac/mv64x60_edac.c b/drivers/edac/mv64x60_edac.c
index a6b9fec..ed25d73 100644
--- a/drivers/edac/mv64x60_edac.c
+++ b/drivers/edac/mv64x60_edac.c
@@ -206,7 +206,7 @@ err:
return res;
}
-static int mv64x60_pci_err_remove(struct platform_device *pdev)
+static int __devexit mv64x60_pci_err_remove(struct platform_device *pdev)
{
struct edac_pci_ctl_info *pci = platform_get_drvdata(pdev);
--
1.6.4.3
The function mxcnd_remove is used only wrapped by __exit_p so define it
using __exit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Artem Bityutskiy <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Vladimir Barinov <[email protected]>
Cc: Vladimir Barinov <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/mtd/nand/mxc_nand.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 65b26d5..ef3e199 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -1052,7 +1052,7 @@ eclk:
return err;
}
-static int __devexit mxcnd_remove(struct platform_device *pdev)
+static int __exit mxcnd_remove(struct platform_device *pdev)
{
struct mxc_nand_host *host = platform_get_drvdata(pdev);
--
1.6.4.3
The function NCR_Q720_remove is defined using __exit, so don't use
__devexit_p but __exit_p to wrap it.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: James E.J. Bottomley <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/scsi/NCR_Q720.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/NCR_Q720.c b/drivers/scsi/NCR_Q720.c
index a8bbdc2..572042f 100644
--- a/drivers/scsi/NCR_Q720.c
+++ b/drivers/scsi/NCR_Q720.c
@@ -350,7 +350,7 @@ static struct mca_driver NCR_Q720_driver = {
.name = "NCR_Q720",
.bus = &mca_bus_type,
.probe = NCR_Q720_probe,
- .remove = __devexit_p(NCR_Q720_remove),
+ .remove = __exit_p(NCR_Q720_remove),
},
};
--
1.6.4.3
The function s3c_adc_remove is used only wrapped by __devexit_p so define
it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: Russell King <[email protected]>
Cc: Ben Dooks <[email protected]>
Cc: Ben Dooks <[email protected]>
Cc: Ramax Lo <[email protected]>
Cc: Nelson Castillo <[email protected]>
Cc: [email protected]
---
arch/arm/plat-s3c24xx/adc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-s3c24xx/adc.c b/arch/arm/plat-s3c24xx/adc.c
index 11117a7..4606072 100644
--- a/arch/arm/plat-s3c24xx/adc.c
+++ b/arch/arm/plat-s3c24xx/adc.c
@@ -364,7 +364,7 @@ static int s3c_adc_probe(struct platform_device *pdev)
return ret;
}
-static int s3c_adc_remove(struct platform_device *pdev)
+static int __devexit s3c_adc_remove(struct platform_device *pdev)
{
struct adc_device *adc = platform_get_drvdata(pdev);
--
1.6.4.3
The function s3c_pwm_remove is used only wrapped by __devexit_p so define
it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: Russell King <[email protected]>
Cc: Ben Dooks <[email protected]>
Cc: Peter Korsgaard <[email protected]>
Cc: [email protected]
---
arch/arm/plat-s3c/pwm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/plat-s3c/pwm.c b/arch/arm/plat-s3c/pwm.c
index 4fdc5b3..ef019f2 100644
--- a/arch/arm/plat-s3c/pwm.c
+++ b/arch/arm/plat-s3c/pwm.c
@@ -368,7 +368,7 @@ static int s3c_pwm_probe(struct platform_device *pdev)
return ret;
}
-static int s3c_pwm_remove(struct platform_device *pdev)
+static int __devexit s3c_pwm_remove(struct platform_device *pdev)
{
struct pwm_device *pwm = platform_get_drvdata(pdev);
--
1.6.4.3
sc26xx_driver_remove is defined using __exit, so wrap it's usage by
__exit_p. This fixes compiling as builtin.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: [email protected]
---
drivers/serial/sc26xx.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/serial/sc26xx.c b/drivers/serial/sc26xx.c
index 75038ad..8ff13eb 100644
--- a/drivers/serial/sc26xx.c
+++ b/drivers/serial/sc26xx.c
@@ -729,7 +729,7 @@ static int __exit sc26xx_driver_remove(struct platform_device *dev)
static struct platform_driver sc26xx_driver = {
.probe = sc26xx_probe,
- .remove = __devexit_p(sc26xx_driver_remove),
+ .remove = __exit_p(sc26xx_driver_remove),
.driver = {
.name = "SC26xx",
.owner = THIS_MODULE,
--
1.6.4.3
The function sgiseeq_remove is defined using __exit, so don't use
__devexit_p but __exit_p to wrap it.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Wang Chen <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Patrick McHardy <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/net/sgiseeq.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c
index ecf3279..f4dfd1f 100644
--- a/drivers/net/sgiseeq.c
+++ b/drivers/net/sgiseeq.c
@@ -826,7 +826,7 @@ static int __exit sgiseeq_remove(struct platform_device *pdev)
static struct platform_driver sgiseeq_driver = {
.probe = sgiseeq_probe,
- .remove = __devexit_p(sgiseeq_remove),
+ .remove = __exit_p(sgiseeq_remove),
.driver = {
.name = "sgiseeq",
.owner = THIS_MODULE,
--
1.6.4.3
The function sgiwd93_remove is defined using __exit, so don't use
__devexit_p but __exit_p to wrap it.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: James E.J. Bottomley <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Dmitri Vorobiev <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/scsi/sgiwd93.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/sgiwd93.c b/drivers/scsi/sgiwd93.c
index 0807b26..2f28ec4 100644
--- a/drivers/scsi/sgiwd93.c
+++ b/drivers/scsi/sgiwd93.c
@@ -312,7 +312,7 @@ static int __exit sgiwd93_remove(struct platform_device *pdev)
static struct platform_driver sgiwd93_driver = {
.probe = sgiwd93_probe,
- .remove = __devexit_p(sgiwd93_remove),
+ .remove = __exit_p(sgiwd93_remove),
.driver = {
.name = "sgiwd93",
.owner = THIS_MODULE,
--
1.6.4.3
The function snd_sgio2audio_remove is defined using __exit, so don't use
__devexit_p but __exit_p to wrap it.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: Figo.zhang <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
sound/mips/sgio2audio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/mips/sgio2audio.c b/sound/mips/sgio2audio.c
index e497525..e24ba5a 100644
--- a/sound/mips/sgio2audio.c
+++ b/sound/mips/sgio2audio.c
@@ -984,7 +984,7 @@ static int __exit snd_sgio2audio_remove(struct platform_device *pdev)
static struct platform_driver sgio2audio_driver = {
.probe = snd_sgio2audio_probe,
- .remove = __devexit_p(snd_sgio2audio_remove),
+ .remove = __exit_p(snd_sgio2audio_remove),
.driver = {
.name = "sgio2audio",
.owner = THIS_MODULE,
--
1.6.4.3
The function snirm710_driver_remove is defined using __exit, so don't
use __devexit_p but __exit_p to wrap it.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: James E.J. Bottomley <[email protected]>
Cc: Yang Hongyang <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/scsi/sni_53c710.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/sni_53c710.c b/drivers/scsi/sni_53c710.c
index 37b3359..491a088 100644
--- a/drivers/scsi/sni_53c710.c
+++ b/drivers/scsi/sni_53c710.c
@@ -133,7 +133,7 @@ static int __exit snirm710_driver_remove(struct platform_device *dev)
static struct platform_driver snirm710_driver = {
.probe = snirm710_probe,
- .remove = __devexit_p(snirm710_driver_remove),
+ .remove = __exit_p(snirm710_driver_remove),
.driver = {
.name = "snirm_53c710",
.owner = THIS_MODULE,
--
1.6.4.3
The function spidev_remove is used only wrapped by __devexit_p so define
it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Wolfgang Ocker <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/spi/spidev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index f921bd1..3379ab9 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -610,7 +610,7 @@ static int spidev_probe(struct spi_device *spi)
return status;
}
-static int spidev_remove(struct spi_device *spi)
+static int __devexit spidev_remove(struct spi_device *spi)
{
struct spidev_data *spidev = spi_get_drvdata(spi);
--
1.6.4.3
The function stex_remove is used only wrapped by __devexit_p so define
it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: Willem Riede <[email protected]>
Cc: James E.J. Bottomley <[email protected]>
Cc: "Kai Mäkisara" <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Ed Lin <[email protected]>
Cc: Yang Hongyang <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
drivers/scsi/stex.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c
index 09fa886..09ee386 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -1679,7 +1679,7 @@ static void stex_hba_free(struct st_hba *hba)
hba->dma_mem, hba->dma_handle);
}
-static void stex_remove(struct pci_dev *pdev)
+static void __devexit stex_remove(struct pci_dev *pdev)
{
struct st_hba *hba = pci_get_drvdata(pdev);
--
1.6.4.3
The function vhci_hcd_remove is used only wrapped by __devexit_p so define
it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Brian G. Merrell <[email protected]>
Cc: Shan Wei <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/staging/usbip/vhci_hcd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c
index 6e91fc2..22b1c6c 100644
--- a/drivers/staging/usbip/vhci_hcd.c
+++ b/drivers/staging/usbip/vhci_hcd.c
@@ -1131,7 +1131,7 @@ static int vhci_hcd_probe(struct platform_device *pdev)
}
-static int vhci_hcd_remove(struct platform_device *pdev)
+static int __devexit vhci_hcd_remove(struct platform_device *pdev)
{
struct usb_hcd *hcd;
--
1.6.4.3
The function virtballoon_remove is used only wrapped by __devexit_p so
define it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: Michael S. Tsirkin <[email protected]>
Cc: [email protected]
---
drivers/virtio/virtio_balloon.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 200c22f..b2d28bb 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -248,7 +248,7 @@ out:
return err;
}
-static void virtballoon_remove(struct virtio_device *vdev)
+static void __devexit virtballoon_remove(struct virtio_device *vdev)
{
struct virtio_balloon *vb = vdev->priv;
--
1.6.4.3
The function virtnet_remove is used only wrapped by __devexit_p so define
it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: Alex Williamson <[email protected]>
Cc: Mark McLoughlin <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/net/virtio_net.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index d445845..8d00976 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -948,7 +948,7 @@ free:
return err;
}
-static void virtnet_remove(struct virtio_device *vdev)
+static void __devexit virtnet_remove(struct virtio_device *vdev)
{
struct virtnet_info *vi = vdev->priv;
struct sk_buff *skb;
--
1.6.4.3
The function virtrng_remove is used only wrapped by __devexit_p so define
it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: Michael S. Tsirkin <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: [email protected]
---
drivers/char/hw_random/virtio-rng.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c
index 962968f..74189b5 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -117,7 +117,7 @@ static int virtrng_probe(struct virtio_device *vdev)
return 0;
}
-static void virtrng_remove(struct virtio_device *vdev)
+static void __devexit virtrng_remove(struct virtio_device *vdev)
{
vdev->config->reset(vdev);
hwrng_unregister(&virtio_hwrng);
--
1.6.4.3
The function zalon_remove is defined using __exit, so don't use __devexit_p
but __exit_p to wrap it.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: James E.J. Bottomley <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Kyle McMartin <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/scsi/zalon.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c
index 27e84e4..19120a6 100644
--- a/drivers/scsi/zalon.c
+++ b/drivers/scsi/zalon.c
@@ -182,7 +182,7 @@ static struct parisc_driver zalon_driver = {
.name = "zalon",
.id_table = zalon_tbl,
.probe = zalon_probe,
- .remove = __devexit_p(zalon_remove),
+ .remove = __exit_p(zalon_remove),
};
static int __init zalon7xx_init(void)
--
1.6.4.3
The function lis3l02dq_remove is used only wrapped by __devexit_p so
define it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
---
drivers/staging/iio/accel/lis3l02dq_core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c
index f008837..80e89a6 100644
--- a/drivers/staging/iio/accel/lis3l02dq_core.c
+++ b/drivers/staging/iio/accel/lis3l02dq_core.c
@@ -871,7 +871,7 @@ err_ret:
}
/* fixme, confirm ordering in this function */
-static int lis3l02dq_remove(struct spi_device *spi)
+static int __devexit lis3l02dq_remove(struct spi_device *spi)
{
int ret;
struct lis3l02dq_state *st = spi_get_drvdata(spi);
--
1.6.4.3
The function sca3000_remove is used only wrapped by __devexit_p so define
it using __devexit.
Signed-off-by: Uwe Kleine-König <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
---
drivers/staging/iio/accel/sca3000_core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/iio/accel/sca3000_core.c b/drivers/staging/iio/accel/sca3000_core.c
index e27e3b7..5ea736a 100644
--- a/drivers/staging/iio/accel/sca3000_core.c
+++ b/drivers/staging/iio/accel/sca3000_core.c
@@ -1393,7 +1393,7 @@ error_ret:
}
-static int sca3000_remove(struct spi_device *spi)
+static int __devexit sca3000_remove(struct spi_device *spi)
{
struct sca3000_state *st = spi_get_drvdata(spi);
struct iio_dev *indio_dev = st->indio_dev;
--
1.6.4.3
At Thu, 1 Oct 2009 10:28:10 +0200,
Uwe Kleine-König wrote:
>
> The function hal2_remove is defined using __exit, so don't use __devexit_p
> but __exit_p to wrap it.
I think it's the other way round. We should replace __exit with __devexit.
Ditto for sound/mips/sgio2audio.c.
thanks,
Takashi
>
> Signed-off-by: Uwe Kleine-König <[email protected]>
> Cc: Takashi Iwai <[email protected]>
> Cc: Jaroslav Kysela <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> ---
> sound/mips/hal2.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c
> index c52691c..72523a7 100644
> --- a/sound/mips/hal2.c
> +++ b/sound/mips/hal2.c
> @@ -926,7 +926,7 @@ static int __exit hal2_remove(struct platform_device *pdev)
>
> static struct platform_driver hal2_driver = {
> .probe = hal2_probe,
> - .remove = __devexit_p(hal2_remove),
> + .remove = __exit_p(hal2_remove),
> .driver = {
> .name = "sgihal2",
> .owner = THIS_MODULE,
> --
> 1.6.4.3
>
Am Donnerstag 01 Oktober 2009 10:28:35 schrieb Uwe Kleine-König:
> The function virtrng_remove is used only wrapped by __devexit_p so define
> it using __devexit.
>
> Signed-off-by: Uwe Kleine-König <[email protected]>
> Acked-by: Sam Ravnborg <[email protected]>
> Cc: Rusty Russell <[email protected]>
> Cc: Michael S. Tsirkin <[email protected]>
> Cc: Christian Borntraeger <[email protected]>
Acked-by: Christian Borntraeger <[email protected]>
It seems that there are similar changes possible in other virtio drivers (e.g.
virtio_net).
[...]
> -static void virtrng_remove(struct virtio_device *vdev)
> +static void __devexit virtrng_remove(struct virtio_device *vdev)
[...]
On Thu, Oct 01, 2009 at 10:44:48AM +0200, Christian Borntraeger wrote:
> Am Donnerstag 01 Oktober 2009 10:28:35 schrieb Uwe Kleine-K?nig:
> > The function virtrng_remove is used only wrapped by __devexit_p so define
> > it using __devexit.
> >
> > Signed-off-by: Uwe Kleine-K?nig <[email protected]>
> > Acked-by: Sam Ravnborg <[email protected]>
> > Cc: Rusty Russell <[email protected]>
> > Cc: Michael S. Tsirkin <[email protected]>
> > Cc: Christian Borntraeger <[email protected]>
>
> Acked-by: Christian Borntraeger <[email protected]>
Thanks
> It seems that there are similar changes possible in other virtio drivers (e.g.
> virtio_net).
I think I once had a patch for that, but while updating the series it
was dropped. I'll recheck for the next iteration.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
On Thu, Oct 01, 2009 at 10:36:59AM +0200, Takashi Iwai wrote:
> At Thu, 1 Oct 2009 10:28:10 +0200,
> Uwe Kleine-K?nig wrote:
> >
> > The function hal2_remove is defined using __exit, so don't use __devexit_p
> > but __exit_p to wrap it.
>
> I think it's the other way round. We should replace __exit with __devexit.
> Ditto for sound/mips/sgio2audio.c.
Actually both ways are possible. I choosed the alternative that doesn't
add bloat to the kernel. The cost is that the device isn't hotplugable,
but you can still unload the module to unbind the driver.
I don't care much, but prefer slightly my approach as changing the patch
is work for me :-)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
On Thu, Oct 01, 2009 at 10:44:48AM +0200, Christian Borntraeger wrote:
> Am Donnerstag 01 Oktober 2009 10:28:35 schrieb Uwe Kleine-K?nig:
> > The function virtrng_remove is used only wrapped by __devexit_p so define
> > it using __devexit.
> >
> > Signed-off-by: Uwe Kleine-K?nig <[email protected]>
> > Acked-by: Sam Ravnborg <[email protected]>
> > Cc: Rusty Russell <[email protected]>
> > Cc: Michael S. Tsirkin <[email protected]>
> > Cc: Christian Borntraeger <[email protected]>
>
> Acked-by: Christian Borntraeger <[email protected]>
FWIW
Acked-by: Michael S. Tsirkin <[email protected]>
> It seems that there are similar changes possible in other virtio drivers (e.g.
> virtio_net).
Yes, and more importantly drivers/virtio/virtio.c as well.
>
> [...]
> > -static void virtrng_remove(struct virtio_device *vdev)
> > +static void __devexit virtrng_remove(struct virtio_device *vdev)
> [...]
Hello,
On Thu, Oct 01, 2009 at 11:12:18AM +0200, Michael S. Tsirkin wrote:
> On Thu, Oct 01, 2009 at 10:44:48AM +0200, Christian Borntraeger wrote:
> > Am Donnerstag 01 Oktober 2009 10:28:35 schrieb Uwe Kleine-K?nig:
> > > The function virtrng_remove is used only wrapped by __devexit_p so define
> > > it using __devexit.
> > >
> > > Signed-off-by: Uwe Kleine-K?nig <[email protected]>
> > > Acked-by: Sam Ravnborg <[email protected]>
> > > Cc: Rusty Russell <[email protected]>
> > > Cc: Michael S. Tsirkin <[email protected]>
> > > Cc: Christian Borntraeger <[email protected]>
> >
> > Acked-by: Christian Borntraeger <[email protected]>
>
> FWIW
> Acked-by: Michael S. Tsirkin <[email protected]>
ok
> > It seems that there are similar changes possible in other virtio drivers (e.g.
> > virtio_net).
http://thread.gmane.org/gmane.linux.kernel/896297/focus=896309
> Yes, and more importantly drivers/virtio/virtio.c as well.
Hm, I don't see it:
$ git grep -E '__(dev)?exit_p' linus/master:drivers/virtio/virtio.c
$
Well, you could add something, but adding __devexit is a noop for most
kernels. It matters only if you don't have CONFIG_HOTPLUG.
In this series I only addressed drivers that use __{,dev}exit and
__{,dev}exit_p inconsistenly. I.e. my script greps for __{,dev}exit_p
and checks the prototype of the wrapped function. I have another
script that does a similar check for platform_devices in general. This
one also notices if you have a __devexit function that isn't wrapped by
__devexit_p.
So if you want to see drivers/virtio/virtio.c improving, send patches
yourself :-)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
On Thu, Oct 01, 2009 at 10:28:33AM +0200, Uwe Kleine-K?nig wrote:
> The function virtballoon_remove is used only wrapped by __devexit_p so
> define it using __devexit.
>
> Signed-off-by: Uwe Kleine-K?nig <[email protected]>
> Acked-by: Sam Ravnborg <[email protected]>
> Cc: Rusty Russell <[email protected]>
> Cc: Michael S. Tsirkin <[email protected]>
> Cc: [email protected]
Acked-by: Michael S. Tsirkin <[email protected]>
Generally I think all remove pointers on virtio bus are devexit. How do
you find all these, and remember to mark new ones properly? Can we
annotate the remove pointer in struct virtio_driver so that sparse can
find them?
> ---
> drivers/virtio/virtio_balloon.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
> index 200c22f..b2d28bb 100644
> --- a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -248,7 +248,7 @@ out:
> return err;
> }
>
> -static void virtballoon_remove(struct virtio_device *vdev)
> +static void __devexit virtballoon_remove(struct virtio_device *vdev)
> {
> struct virtio_balloon *vb = vdev->priv;
>
> --
> 1.6.4.3
Thanks Uwe
Acked-by: Jonathan Cameron <[email protected]>
> The function lis3l02dq_remove is used only wrapped by __devexit_p so
> define it using __devexit.
>
> Signed-off-by: Uwe Kleine-König <[email protected]>
> Cc: Jonathan Cameron <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: [email protected]
> ---
> drivers/staging/iio/accel/lis3l02dq_core.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c
> index f008837..80e89a6 100644
> --- a/drivers/staging/iio/accel/lis3l02dq_core.c
> +++ b/drivers/staging/iio/accel/lis3l02dq_core.c
> @@ -871,7 +871,7 @@ err_ret:
> }
>
> /* fixme, confirm ordering in this function */
> -static int lis3l02dq_remove(struct spi_device *spi)
> +static int __devexit lis3l02dq_remove(struct spi_device *spi)
> {
> int ret;
> struct lis3l02dq_state *st = spi_get_drvdata(spi);
Hi Uwe,
Thanks,
Acked-by: Jonathan Cameron <[email protected]>
> The function sca3000_remove is used only wrapped by __devexit_p so define
> it using __devexit.
>
> Signed-off-by: Uwe Kleine-König <[email protected]>
> Cc: Jonathan Cameron <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: [email protected]
> ---
> drivers/staging/iio/accel/sca3000_core.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/staging/iio/accel/sca3000_core.c b/drivers/staging/iio/accel/sca3000_core.c
> index e27e3b7..5ea736a 100644
> --- a/drivers/staging/iio/accel/sca3000_core.c
> +++ b/drivers/staging/iio/accel/sca3000_core.c
> @@ -1393,7 +1393,7 @@ error_ret:
>
> }
>
> -static int sca3000_remove(struct spi_device *spi)
> +static int __devexit sca3000_remove(struct spi_device *spi)
> {
> struct sca3000_state *st = spi_get_drvdata(spi);
> struct iio_dev *indio_dev = st->indio_dev;
On Thu, Oct 01, 2009 at 11:31:06AM +0200, Uwe Kleine-K?nig wrote:
> Hello,
>
> On Thu, Oct 01, 2009 at 11:12:18AM +0200, Michael S. Tsirkin wrote:
> > On Thu, Oct 01, 2009 at 10:44:48AM +0200, Christian Borntraeger wrote:
> > > Am Donnerstag 01 Oktober 2009 10:28:35 schrieb Uwe Kleine-K?nig:
> > > > The function virtrng_remove is used only wrapped by __devexit_p so define
> > > > it using __devexit.
> > > >
> > > > Signed-off-by: Uwe Kleine-K?nig <[email protected]>
> > > > Acked-by: Sam Ravnborg <[email protected]>
> > > > Cc: Rusty Russell <[email protected]>
> > > > Cc: Michael S. Tsirkin <[email protected]>
> > > > Cc: Christian Borntraeger <[email protected]>
> > >
> > > Acked-by: Christian Borntraeger <[email protected]>
> >
> > FWIW
> > Acked-by: Michael S. Tsirkin <[email protected]>
> ok
>
> > > It seems that there are similar changes possible in other virtio drivers (e.g.
> > > virtio_net).
> http://thread.gmane.org/gmane.linux.kernel/896297/focus=896309
>
> > Yes, and more importantly drivers/virtio/virtio.c as well.
> Hm, I don't see it:
>
> $ git grep -E '__(dev)?exit_p' linus/master:drivers/virtio/virtio.c
>
> $
>
> Well, you could add something, but adding __devexit is a noop for most
> kernels. It matters only if you don't have CONFIG_HOTPLUG.
And MODULE.
> In this series I only addressed drivers that use __{,dev}exit and
> __{,dev}exit_p inconsistenly. I.e. my script greps for __{,dev}exit_p
> and checks the prototype of the wrapped function. I have another
> script that does a similar check for platform_devices in general. This
> one also notices if you have a __devexit function that isn't wrapped by
> __devexit_p.
Can we teach sparse about this?
> So if you want to see drivers/virtio/virtio.c improving, send patches
> yourself :-)
Here's my reasoning:
include/linux/virtio.h defines virtio_driver, and remove pointer
there is only used on hot-unplug or module removal.
This is the only reason I see that we can make device removal as devexit.
So we can make all of them devexit then?
> Best regards
> Uwe
>
> --
> Pengutronix e.K. | Uwe Kleine-K?nig |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
Hello Michael,
On Thu, Oct 01, 2009 at 11:35:48AM +0200, Michael S. Tsirkin wrote:
> On Thu, Oct 01, 2009 at 10:28:33AM +0200, Uwe Kleine-K?nig wrote:
> > The function virtballoon_remove is used only wrapped by __devexit_p so
> > define it using __devexit.
> >
> > Signed-off-by: Uwe Kleine-K?nig <[email protected]>
> > Acked-by: Sam Ravnborg <[email protected]>
> > Cc: Rusty Russell <[email protected]>
> > Cc: Michael S. Tsirkin <[email protected]>
> > Cc: [email protected]
>
> Acked-by: Michael S. Tsirkin <[email protected]>
>
> Generally I think all remove pointers on virtio bus are devexit.
That means I missed something?
> How do
> you find all these,
I have a script that only generates few false-positives (and an unknown
number of false-negatives).
> and remember to mark new ones properly?
I don't understand that question. You need to have understood how these
markings work and do it right.
> Can we
> annotate the remove pointer in struct virtio_driver so that sparse can
> find them?
I already thought about a runtime check. I didn't implement anything
yet though.
I can give you my script that finds problems for platform_drivers. You
should be able to adapt it for other types of drivers easily. When most
platform_driver patches are in, I plan to look at pci.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
On Thu, Oct 01, 2009 at 11:52:09AM +0200, Uwe Kleine-K?nig wrote:
> Hello Michael,
>
> On Thu, Oct 01, 2009 at 11:35:48AM +0200, Michael S. Tsirkin wrote:
> > On Thu, Oct 01, 2009 at 10:28:33AM +0200, Uwe Kleine-K?nig wrote:
> > > The function virtballoon_remove is used only wrapped by __devexit_p so
> > > define it using __devexit.
> > >
> > > Signed-off-by: Uwe Kleine-K?nig <[email protected]>
> > > Acked-by: Sam Ravnborg <[email protected]>
> > > Cc: Rusty Russell <[email protected]>
> > > Cc: Michael S. Tsirkin <[email protected]>
> > > Cc: [email protected]
> >
> > Acked-by: Michael S. Tsirkin <[email protected]>
> >
> > Generally I think all remove pointers on virtio bus are devexit.
> That means I missed something?
I meant to say, they *should* be devexit.
Hello,
On Thu, Oct 01, 2009 at 11:45:18AM +0200, Michael S. Tsirkin wrote:
> On Thu, Oct 01, 2009 at 11:31:06AM +0200, Uwe Kleine-K?nig wrote:
> > Hello,
> >
> > On Thu, Oct 01, 2009 at 11:12:18AM +0200, Michael S. Tsirkin wrote:
> > > On Thu, Oct 01, 2009 at 10:44:48AM +0200, Christian Borntraeger wrote:
> > > > Am Donnerstag 01 Oktober 2009 10:28:35 schrieb Uwe Kleine-K?nig:
> > > > > The function virtrng_remove is used only wrapped by __devexit_p so define
> > > > > it using __devexit.
> > > > >
> > > > > Signed-off-by: Uwe Kleine-K?nig <[email protected]>
> > > > > Acked-by: Sam Ravnborg <[email protected]>
> > > > > Cc: Rusty Russell <[email protected]>
> > > > > Cc: Michael S. Tsirkin <[email protected]>
> > > > > Cc: Christian Borntraeger <[email protected]>
> > > >
> > > > Acked-by: Christian Borntraeger <[email protected]>
> > >
> > > FWIW
> > > Acked-by: Michael S. Tsirkin <[email protected]>
> > ok
> >
> > > > It seems that there are similar changes possible in other virtio drivers (e.g.
> > > > virtio_net).
> > http://thread.gmane.org/gmane.linux.kernel/896297/focus=896309
> >
> > > Yes, and more importantly drivers/virtio/virtio.c as well.
> > Hm, I don't see it:
> >
> > $ git grep -E '__(dev)?exit_p' linus/master:drivers/virtio/virtio.c
> >
> > $
> >
> > Well, you could add something, but adding __devexit is a noop for most
> > kernels. It matters only if you don't have CONFIG_HOTPLUG.
>
> And MODULE.
Well, discarding does not really depend on CONFIG_MODULE.
.devexit sections are only discarded from vmlinux (and not modules) and
only if CONFIG_HOTPLUG=n. So my statement could be extended to:
Adding __devexit is a noop for most kernels. It matters only if you
don't have CONFIG_HOTPLUG and then only for code that is not compiled as
a module.
> > In this series I only addressed drivers that use __{,dev}exit and
> > __{,dev}exit_p inconsistenly. I.e. my script greps for __{,dev}exit_p
> > and checks the prototype of the wrapped function. I have another
> > script that does a similar check for platform_devices in general. This
> > one also notices if you have a __devexit function that isn't wrapped by
> > __devexit_p.
>
> Can we teach sparse about this?
I don't know much about sparse, better ask on linux-sparse.
> > So if you want to see drivers/virtio/virtio.c improving, send patches
> > yourself :-)
>
> Here's my reasoning:
> include/linux/virtio.h defines virtio_driver, and remove pointer
> there is only used on hot-unplug or module removal.
> This is the only reason I see that we can make device removal as devexit.
> So we can make all of them devexit then?
Exactly the same applies to platform_drivers. The remove callback is
only called if the driver is unregistered or the device is unbound.
But note it's not an error in general to use a .text function as remove
callback. E.g. take drivers/gpio/twl4030-gpio.c. gpio_twl4030_remove
is used in gpio_twl4030_probe which is defined using __devinit. So
using __devexit for gpio_twl4030_remove is wrong. (So there is a bug,
as gpio_twl4030_remove uses __devexit.) I didn't try, but as far as I
understand this will result in a compile error if the driver is built-in
with HOTPLUG=n.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
On Thu, Oct 01, 2009 at 12:17:27PM +0200, Uwe Kleine-K?nig wrote:
> Hello,
>
> On Thu, Oct 01, 2009 at 11:45:18AM +0200, Michael S. Tsirkin wrote:
> > On Thu, Oct 01, 2009 at 11:31:06AM +0200, Uwe Kleine-K?nig wrote:
> > > Hello,
> > >
> > > On Thu, Oct 01, 2009 at 11:12:18AM +0200, Michael S. Tsirkin wrote:
> > > > On Thu, Oct 01, 2009 at 10:44:48AM +0200, Christian Borntraeger wrote:
> > > > > Am Donnerstag 01 Oktober 2009 10:28:35 schrieb Uwe Kleine-K?nig:
> > > > > > The function virtrng_remove is used only wrapped by __devexit_p so define
> > > > > > it using __devexit.
> > > > > >
> > > > > > Signed-off-by: Uwe Kleine-K?nig <[email protected]>
> > > > > > Acked-by: Sam Ravnborg <[email protected]>
> > > > > > Cc: Rusty Russell <[email protected]>
> > > > > > Cc: Michael S. Tsirkin <[email protected]>
> > > > > > Cc: Christian Borntraeger <[email protected]>
> > > > >
> > > > > Acked-by: Christian Borntraeger <[email protected]>
> > > >
> > > > FWIW
> > > > Acked-by: Michael S. Tsirkin <[email protected]>
> > > ok
> > >
> > > > > It seems that there are similar changes possible in other virtio drivers (e.g.
> > > > > virtio_net).
> > > http://thread.gmane.org/gmane.linux.kernel/896297/focus=896309
> > >
> > > > Yes, and more importantly drivers/virtio/virtio.c as well.
> > > Hm, I don't see it:
> > >
> > > $ git grep -E '__(dev)?exit_p' linus/master:drivers/virtio/virtio.c
> > >
> > > $
> > >
> > > Well, you could add something, but adding __devexit is a noop for most
> > > kernels. It matters only if you don't have CONFIG_HOTPLUG.
> >
> > And MODULE.
> Well, discarding does not really depend on CONFIG_MODULE.
> .devexit sections are only discarded from vmlinux (and not modules) and
> only if CONFIG_HOTPLUG=n. So my statement could be extended to:
>
> Adding __devexit is a noop for most kernels. It matters only if you
> don't have CONFIG_HOTPLUG and then only for code that is not compiled as
> a module.
>
> > > In this series I only addressed drivers that use __{,dev}exit and
> > > __{,dev}exit_p inconsistenly. I.e. my script greps for __{,dev}exit_p
> > > and checks the prototype of the wrapped function. I have another
> > > script that does a similar check for platform_devices in general. This
> > > one also notices if you have a __devexit function that isn't wrapped by
> > > __devexit_p.
> >
> > Can we teach sparse about this?
> I don't know much about sparse, better ask on linux-sparse.
>
> > > So if you want to see drivers/virtio/virtio.c improving, send patches
> > > yourself :-)
> >
> > Here's my reasoning:
> > include/linux/virtio.h defines virtio_driver, and remove pointer
> > there is only used on hot-unplug or module removal.
> > This is the only reason I see that we can make device removal as devexit.
> > So we can make all of them devexit then?
> Exactly the same applies to platform_drivers. The remove callback is
> only called if the driver is unregistered or the device is unbound.
>
> But note it's not an error in general to use a .text function as remove
> callback. E.g. take drivers/gpio/twl4030-gpio.c. gpio_twl4030_remove
> is used in gpio_twl4030_probe which is defined using __devinit. So
> using __devexit for gpio_twl4030_remove is wrong. (So there is a bug,
> as gpio_twl4030_remove uses __devexit.) I didn't try, but as far as I
> understand this will result in a compile error if the driver is built-in
> with HOTPLUG=n.
Wait a second.
As far as I understand, __devexit makes it possible to remove code if
hotplug is off.
At least for static functions, it's enough to mark their only use
as _devexit_p, and compiler will remove the text as it's unused.
Isn't that right?
If so, what, again, was the motivation for the patches that added
__devexit to functions that were already used with __devexit_p?
> Best regards
> Uwe
>
> --
> Pengutronix e.K. | Uwe Kleine-K?nig |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
> The function ilo_remove is used only wrapped by __devexit_p so define it
> using __devexit.
Looks good to me. Not sure if this is needed or not...
Acked-by: David Altobelli <[email protected]>
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m????????????I?
On Thu, 2009-10-01 at 10:28 +0200, Uwe Kleine-König wrote:
> The function atp870u_remove is used only wrapped by __devexit_p so define
> it using __devexit.
What's the justification for this?
Given that practically every kernel on the planet is hotplug enabled
these days and that the savings on the very few that aren't from
discarding the devexit section is at most a page or two (and even arm
says they don't care about that), there doesn't seem to be any point
making these changes. In fact, I think we can just kill devinit and
devexit as section markers.
James
Hi Uwe,
On Thu, Oct 01, 2009 at 10:28:05AM +0200, Uwe Kleine-K?nig wrote:
> The function asic3_remove is used only wrapped by __devexit_p so define
> it using __devexit.
Applied to the mfd tree, thanks.
Cheers,
Samuel.
> Signed-off-by: Uwe Kleine-K?nig <[email protected]>
> Acked-by: Sam Ravnborg <[email protected]>
> Cc: Samuel Ortiz <[email protected]>
> Cc: Philipp Zabel <[email protected]>
> Cc: Yinghai Lu <[email protected]>
> Cc: Russell King <[email protected]>
> Cc: [email protected]
> ---
> drivers/mfd/asic3.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c
> index 63a2a66..e22128c 100644
> --- a/drivers/mfd/asic3.c
> +++ b/drivers/mfd/asic3.c
> @@ -908,7 +908,7 @@ static int __init asic3_probe(struct platform_device *pdev)
> return ret;
> }
>
> -static int asic3_remove(struct platform_device *pdev)
> +static int __devexit asic3_remove(struct platform_device *pdev)
> {
> int ret;
> struct asic3 *asic = platform_get_drvdata(pdev);
> --
> 1.6.4.3
>
--
Intel Open Source Technology Centre
http://oss.intel.com/
Hello Michael,
> > But note it's not an error in general to use a .text function as remove
> > callback. E.g. take drivers/gpio/twl4030-gpio.c. gpio_twl4030_remove
> > is used in gpio_twl4030_probe which is defined using __devinit. So
> > using __devexit for gpio_twl4030_remove is wrong. (So there is a bug,
> > as gpio_twl4030_remove uses __devexit.) I didn't try, but as far as I
> > understand this will result in a compile error if the driver is built-in
> > with HOTPLUG=n.
>
> Wait a second.
> As far as I understand, __devexit makes it possible to remove code if
> hotplug is off.
right.
> At least for static functions, it's enough to mark their only use
> as _devexit_p, and compiler will remove the text as it's unused.
>
> Isn't that right?
hmm, I don't know. I'll try, one moment. OK, you're right. The
function is discarded with a compiler warning.
> If so, what, again, was the motivation for the patches that added
> __devexit to functions that were already used with __devexit_p?
I thought it saves some memory, but as it looks now it only fixes a
compiler warning.
Note there are two types of errors fixed in this series. One is:
-static int func(void arg)
+static int __devexit func(void arg)
if the only usage of func() is wraped by __devexit_p. This is (as
seen above) not that critical, there is only a warning fixed.
The other type results in a build failure:
-remove = __devexit_p(another_func),
+remove = __exit_p(another_func),
with another_func being defined using __exit. In the case
defined(MODULE) && defined(CONFIG_HOTPLUG) another_func is discarded,
but __devexit_p(another_func) evaluates to another_func and thus the
module doesn't link.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Hello David,
On Thu, Oct 01, 2009 at 02:10:27PM +0000, Altobelli, David wrote:
> > The function ilo_remove is used only wrapped by __devexit_p so define it
> > using __devexit.
>
> Looks good to me. Not sure if this is needed or not...
it fixes at least a warning if you compile the driver as built-in with
CONFIG_HOTPLUG=n about ilo_remove not being used.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
>> Looks good to me. Not sure if this is needed or not...
> it fixes at least a warning
Sorry for any confusion, I was referring to my specific Acked-by,
I didn't know if you needed that from me.
On Thu, Oct 01, 2009 at 07:41:16PM +0200, Uwe Kleine-K?nig wrote:
> Hello Michael,
>
> > > But note it's not an error in general to use a .text function as remove
> > > callback. E.g. take drivers/gpio/twl4030-gpio.c. gpio_twl4030_remove
> > > is used in gpio_twl4030_probe which is defined using __devinit. So
> > > using __devexit for gpio_twl4030_remove is wrong. (So there is a bug,
> > > as gpio_twl4030_remove uses __devexit.) I didn't try, but as far as I
> > > understand this will result in a compile error if the driver is built-in
> > > with HOTPLUG=n.
> >
> > Wait a second.
> > As far as I understand, __devexit makes it possible to remove code if
> > hotplug is off.
> right.
>
> > At least for static functions, it's enough to mark their only use
> > as _devexit_p, and compiler will remove the text as it's unused.
> >
> > Isn't that right?
> hmm, I don't know. I'll try, one moment. OK, you're right. The
> function is discarded with a compiler warning.
>
> > If so, what, again, was the motivation for the patches that added
> > __devexit to functions that were already used with __devexit_p?
> I thought it saves some memory, but as it looks now it only fixes a
> compiler warning.
We can redefine __devexit_p(x) to something like
#define __devexit_p(x) ((typeof(x) *)NULL)
and this will shut down the warning without need to fix the code.
Using _devexit_p for static functions is also safer
than __devexit since if you define a function as __devexit
and by mistake call it from another context, it won't link.
Makes sense?
> Note there are two types of errors fixed in this series. One is:
>
> -static int func(void arg)
> +static int __devexit func(void arg)
>
> if the only usage of func() is wraped by __devexit_p. This is (as
> seen above) not that critical, there is only a warning fixed.
>
> The other type results in a build failure:
>
> -remove = __devexit_p(another_func),
> +remove = __exit_p(another_func),
>
> with another_func being defined using __exit. In the case
> defined(MODULE) && defined(CONFIG_HOTPLUG) another_func is discarded,
> but __devexit_p(another_func) evaluates to another_func and thus the
> module doesn't link.
Yes, calling __exit function from non- __exit is always a bug.
I think there's a make flag to warn about this, not sure why it's
not the default.
> Best regards
> Uwe
>
> --
> Pengutronix e.K. | Uwe Kleine-K?nig |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
Hello Michael,
On Thu, Oct 01, 2009 at 08:05:00PM +0200, Michael S. Tsirkin wrote:
> On Thu, Oct 01, 2009 at 07:41:16PM +0200, Uwe Kleine-K?nig wrote:
> > Hello Michael,
> >
> > > > But note it's not an error in general to use a .text function as remove
> > > > callback. E.g. take drivers/gpio/twl4030-gpio.c. gpio_twl4030_remove
> > > > is used in gpio_twl4030_probe which is defined using __devinit. So
> > > > using __devexit for gpio_twl4030_remove is wrong. (So there is a bug,
> > > > as gpio_twl4030_remove uses __devexit.) I didn't try, but as far as I
> > > > understand this will result in a compile error if the driver is built-in
> > > > with HOTPLUG=n.
> > >
> > > Wait a second.
> > > As far as I understand, __devexit makes it possible to remove code if
> > > hotplug is off.
> > right.
> >
> > > At least for static functions, it's enough to mark their only use
> > > as _devexit_p, and compiler will remove the text as it's unused.
> > >
> > > Isn't that right?
> > hmm, I don't know. I'll try, one moment. OK, you're right. The
> > function is discarded with a compiler warning.
> >
> > > If so, what, again, was the motivation for the patches that added
> > > __devexit to functions that were already used with __devexit_p?
> > I thought it saves some memory, but as it looks now it only fixes a
> > compiler warning.
>
> We can redefine __devexit_p(x) to something like
> #define __devexit_p(x) ((typeof(x) *)NULL)
> and this will shut down the warning without need to fix the code.
Mmmmh, don't know. A definitive advantage is that there is only a
single point in the code that defines if a function is discarded or not.
Nothing that needs to be consistent.
For me it feels somehow wrong anyhow, but that might be only because I'm
used to the current model.
> > Note there are two types of errors fixed in this series. One is:
> >
> > -static int func(void arg)
> > +static int __devexit func(void arg)
> >
> > if the only usage of func() is wraped by __devexit_p. This is (as
> > seen above) not that critical, there is only a warning fixed.
> >
> > The other type results in a build failure:
> >
> > -remove = __devexit_p(another_func),
> > +remove = __exit_p(another_func),
> >
> > with another_func being defined using __exit. In the case
> > defined(MODULE) && defined(CONFIG_HOTPLUG) another_func is discarded,
> > but __devexit_p(another_func) evaluates to another_func and thus the
> > module doesn't link.
>
> Yes, calling __exit function from non- __exit is always a bug.
> I think there's a make flag to warn about this, not sure why it's
> not the default.
I think it was disabled because there were too many warnings :-)
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Hi Uwe,
Uwe Kleine-König wrote:
> The function mcf_remove is used only wrapped by __devexit_p so define it
> using __devexit.
>
> Signed-off-by: Uwe Kleine-König <[email protected]>
> Cc: Greg Ungerer <[email protected]>
> Cc: Len Sorensen <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: Alan Cox <[email protected]>
> Cc: [email protected]
> ---
> drivers/serial/mcf.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/serial/mcf.c b/drivers/serial/mcf.c
> index b443824..7bb5fee 100644
> --- a/drivers/serial/mcf.c
> +++ b/drivers/serial/mcf.c
> @@ -602,7 +602,7 @@ static int __devinit mcf_probe(struct platform_device *pdev)
>
> /****************************************************************************/
>
> -static int mcf_remove(struct platform_device *pdev)
> +static int __devexit mcf_remove(struct platform_device *pdev)
> {
> struct uart_port *port;
> int i;
Looks good. I'll add that to the m68knommu git, for-linus branch.
Thanks
Greg
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: [email protected]
SnapGear Group, McAfee PHONE: +61 7 3435 2888
825 Stanley St, FAX: +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
Uwe Kleine-König wrote:
> The function s3c_adc_remove is used only wrapped by __devexit_p so define
> it using __devexit.
>
> Signed-off-by: Uwe Kleine-König <[email protected]>
> Acked-by: Sam Ravnborg <[email protected]>
> Cc: Russell King <[email protected]>
> Cc: Ben Dooks <[email protected]>
Acked-By: Ben Dooks <[email protected]>
> Cc: Ramax Lo <[email protected]>
> Cc: Nelson Castillo <[email protected]>
> Cc: [email protected]
--
Ben Dooks, Software Engineer, Simtec Electronics
http://www.simtec.co.uk/
At Thu, 1 Oct 2009 10:53:55 +0200,
Uwe Kleine-König wrote:
>
> On Thu, Oct 01, 2009 at 10:36:59AM +0200, Takashi Iwai wrote:
> > At Thu, 1 Oct 2009 10:28:10 +0200,
> > Uwe Kleine-König wrote:
> > >
> > > The function hal2_remove is defined using __exit, so don't use __devexit_p
> > > but __exit_p to wrap it.
> >
> > I think it's the other way round. We should replace __exit with __devexit.
> > Ditto for sound/mips/sgio2audio.c.
> Actually both ways are possible. I choosed the alternative that doesn't
> add bloat to the kernel. The cost is that the device isn't hotplugable,
> but you can still unload the module to unbind the driver.
Hm, is it really safe to set remove=NULL although the driver needs
some work at unbinding? It looks like that unbind is allowed no
matter whether remove is NULL or not. So, it would jus keeps stray
resources, and it might conflict at the next bind.
> I don't care much, but prefer slightly my approach as changing the patch
> is work for me :-)
I prefer rather symmetry and safety :)
I'm going to change to __devexit.
thanks,
Takashi
Hello,
On Fri, Oct 02, 2009 at 11:02:56AM +0200, Takashi Iwai wrote:
> At Thu, 1 Oct 2009 10:53:55 +0200,
> Uwe Kleine-K?nig wrote:
> >
> > On Thu, Oct 01, 2009 at 10:36:59AM +0200, Takashi Iwai wrote:
> > > At Thu, 1 Oct 2009 10:28:10 +0200,
> > > Uwe Kleine-K?nig wrote:
> > > >
> > > > The function hal2_remove is defined using __exit, so don't use __devexit_p
> > > > but __exit_p to wrap it.
> > >
> > > I think it's the other way round. We should replace __exit with __devexit.
> > > Ditto for sound/mips/sgio2audio.c.
> > Actually both ways are possible. I choosed the alternative that doesn't
> > add bloat to the kernel. The cost is that the device isn't hotplugable,
> > but you can still unload the module to unbind the driver.
>
> Hm, is it really safe to set remove=NULL although the driver needs
> some work at unbinding? It looks like that unbind is allowed no
> matter whether remove is NULL or not. So, it would jus keeps stray
> resources, and it might conflict at the next bind.
I just tried that and you're right. IMHO that's a bug. Greg?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
At Fri, 2 Oct 2009 11:20:25 +0200,
Uwe Kleine-König wrote:
>
> Hello,
>
> On Fri, Oct 02, 2009 at 11:02:56AM +0200, Takashi Iwai wrote:
> > At Thu, 1 Oct 2009 10:53:55 +0200,
> > Uwe Kleine-König wrote:
> > >
> > > On Thu, Oct 01, 2009 at 10:36:59AM +0200, Takashi Iwai wrote:
> > > > At Thu, 1 Oct 2009 10:28:10 +0200,
> > > > Uwe Kleine-König wrote:
> > > > >
> > > > > The function hal2_remove is defined using __exit, so don't use __devexit_p
> > > > > but __exit_p to wrap it.
> > > >
> > > > I think it's the other way round. We should replace __exit with __devexit.
> > > > Ditto for sound/mips/sgio2audio.c.
> > > Actually both ways are possible. I choosed the alternative that doesn't
> > > add bloat to the kernel. The cost is that the device isn't hotplugable,
> > > but you can still unload the module to unbind the driver.
> >
> > Hm, is it really safe to set remove=NULL although the driver needs
> > some work at unbinding? It looks like that unbind is allowed no
> > matter whether remove is NULL or not. So, it would jus keeps stray
> > resources, and it might conflict at the next bind.
> I just tried that and you're right. IMHO that's a bug. Greg?
I suppose it's a bug of the driver, not the core :)
If the driver doesn't need to release resources, it would work fine
with remove = NULL. Also, the bus can provide a common remove
callback (even it's over the driver's remove callback). So, in
theory, it can be NULL.
But, it must be really rare, and non-NULL remove is very likely a bug
if the driver is built with CONFIG_HOTPLUG=y...
thanks,
Takashi
Hello,
On Thu, Oct 01, 2009 at 02:20:02PM +0000, James Bottomley wrote:
> Given that practically every kernel on the planet is hotplug enabled
> these days and that the savings on the very few that aren't from
> discarding the devexit section is at most a page or two (and even arm
> says they don't care about that), there doesn't seem to be any point
> making these changes. In fact, I think we can just kill devinit and
> devexit as section markers.
IMHO you should better kill CONFIG_HOTPLUG completely then.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
On Thu, Oct 01, 2009 at 10:28:09AM +0200, Uwe Kleine-K?nig wrote:
> The function grover_remove is used only wrapped by __devexit_p so define
> it using __devexit.
>
> Signed-off-by: Uwe Kleine-K?nig <[email protected]>
> Acked-by: Sam Ravnborg <[email protected]>
Folded together with your other patch to sparkspkr and applied.
Thanks Uwe.
--
Dmitry
On Thu, 1 Oct 2009 05:58:33 pm Uwe Kleine-König wrote:
> The function virtballoon_remove is used only wrapped by __devexit_p so
> define it using __devexit.
Thanks, applied!
Rusty.