linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* wrong usage of __devexit_p and __exit_p
@ 2009-01-12 13:50 Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move asic3_remove to .devexit.text Uwe Kleine-König
                   ` (23 more replies)
  0 siblings, 24 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:50 UTC (permalink / raw)
  To: linux-kernel

Hello,

I found several drivers that use __devexit_p and __exit_p on functions
that don't live in .devexit.text or .exit.text resp.

The impact is either that these functions use memory without being used
or that they don't link.

I send 24 patches as a reply to this mail.  I choosed to move the
functions into the respective function instead of using the right
__{dev,}exit_p wrapper because it seems to me to have less impact.

I didn't made the effort to find out the right people to Cc: but I hope
that Andrew takes care of that :-)

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

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

* [PATCH] move asic3_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move bbc_remove " Uwe Kleine-König
                   ` (22 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function asic3_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 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 9e48545..b8150ec 100644
--- a/drivers/mfd/asic3.c
+++ b/drivers/mfd/asic3.c
@@ -606,7 +606,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.5.6.5


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

* [PATCH] move bbc_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move asic3_remove to .devexit.text Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move grover_remove " Uwe Kleine-König
                   ` (21 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function bbc_remove is used only wrapped by __devexit_p so define it
using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 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.5.6.5


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

* [PATCH] move grover_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move asic3_remove to .devexit.text Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move bbc_remove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move hifn_remove " Uwe Kleine-König
                   ` (20 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function grover_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 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.5.6.5


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

* [PATCH] move hifn_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (2 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move grover_remove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move ilo_remove " Uwe Kleine-König
                   ` (19 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function hifn_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/crypto/hifn_795x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index 0c79fe7..0d6be63 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -2696,7 +2696,7 @@ err_out_disable_pci_device:
 	return err;
 }
 
-static void hifn_remove(struct pci_dev *pdev)
+static void __devexit hifn_remove(struct pci_dev *pdev)
 {
 	int i;
 	struct hifn_device *dev;
-- 
1.5.6.5


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

* [PATCH] move ilo_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (3 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move hifn_remove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move jsm_remove_one " Uwe Kleine-König
                   ` (18 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function ilo_remove is used only wrapped by __devexit_p so define it
using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 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 05e2982..c1d8788 100644
--- a/drivers/misc/hpilo.c
+++ b/drivers/misc/hpilo.c
@@ -611,7 +611,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.5.6.5


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

* [PATCH] move jsm_remove_one to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (4 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move ilo_remove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move max7301_remove " Uwe Kleine-König
                   ` (17 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function jsm_remove_one is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/serial/jsm/jsm_driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/jsm/jsm_driver.c b/drivers/serial/jsm/jsm_driver.c
index 338cf8a..92187e2 100644
--- a/drivers/serial/jsm/jsm_driver.c
+++ b/drivers/serial/jsm/jsm_driver.c
@@ -180,7 +180,7 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	return rc;
 }
 
-static void jsm_remove_one(struct pci_dev *pdev)
+static void __devexit jsm_remove_one(struct pci_dev *pdev)
 {
 	struct jsm_board *brd = pci_get_drvdata(pdev);
 	int i = 0;
-- 
1.5.6.5


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

* [PATCH] move max7301_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (5 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move jsm_remove_one " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move megaraid_detach_one " Uwe Kleine-König
                   ` (16 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function max7301_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/gpio/max7301.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpio/max7301.c b/drivers/gpio/max7301.c
index 8b24d78..2d9d30a 100644
--- a/drivers/gpio/max7301.c
+++ b/drivers/gpio/max7301.c
@@ -285,7 +285,7 @@ exit_destroy:
 	return ret;
 }
 
-static int max7301_remove(struct spi_device *spi)
+static int __devexit max7301_remove(struct spi_device *spi)
 {
 	struct max7301 *ts;
 	int ret;
-- 
1.5.6.5


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

* [PATCH] move megaraid_detach_one to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (6 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move max7301_remove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move mpc85xx_pci_err_remove " Uwe Kleine-König
                   ` (15 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function megaraid_detach_one is used only wrapped by __devexit_p so
define it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 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 805bb61..feb68b2 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.5.6.5


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

* [PATCH] move mpc85xx_pci_err_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (7 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move megaraid_detach_one " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move mv64x60_pci_err_remove " Uwe Kleine-König
                   ` (14 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

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 <u.kleine-koenig@pengutronix.de>
---
 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 853ef37..2459bdc 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -302,7 +302,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.5.6.5


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

* [PATCH] move mv64x60_pci_err_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (8 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move mpc85xx_pci_err_remove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move mxcnd_remove to .exit.text Uwe Kleine-König
                   ` (13 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

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 <u.kleine-koenig@pengutronix.de>
---
 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 083ce8d..1abdf32 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.5.6.5


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

* [PATCH] move mxcnd_remove to .exit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (9 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move mv64x60_pci_err_remove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move pxa_camera_remove " Uwe Kleine-König
                   ` (12 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function mxcnd_remove is used only wrapped by __exit_p so define it
using __exit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 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 21fd4f1..b86b482 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -991,7 +991,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.5.6.5


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

* [PATCH] move pxa_camera_remove to .exit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (10 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move mxcnd_remove to .exit.text Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move s3c_adc_remove to .devexit.text Uwe Kleine-König
                   ` (11 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function pxa_camera_remove is used only wrapped by __exit_p so define
it using __exit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/media/video/pxa_camera.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c
index a1d6008..3f64138 100644
--- a/drivers/media/video/pxa_camera.c
+++ b/drivers/media/video/pxa_camera.c
@@ -1521,7 +1521,7 @@ exit:
 	return err;
 }
 
-static int __devexit pxa_camera_remove(struct platform_device *pdev)
+static int __exit pxa_camera_remove(struct platform_device *pdev)
 {
 	struct pxa_camera_dev *pcdev = platform_get_drvdata(pdev);
 	struct resource *res;
-- 
1.5.6.5


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

* [PATCH] move s3c_adc_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (11 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move pxa_camera_remove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move s3c_pwm_remove " Uwe Kleine-König
                   ` (10 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function s3c_adc_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 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 9a5c767..83b948e 100644
--- a/arch/arm/plat-s3c24xx/adc.c
+++ b/arch/arm/plat-s3c24xx/adc.c
@@ -302,7 +302,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.5.6.5


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

* [PATCH] move s3c_pwm_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (12 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move s3c_adc_remove to .devexit.text Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move sc26xx_driver_remove " Uwe Kleine-König
                   ` (9 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function s3c_pwm_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 arch/arm/plat-s3c24xx/pwm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-s3c24xx/pwm.c b/arch/arm/plat-s3c24xx/pwm.c
index 0120b76..02a0df5 100644
--- a/arch/arm/plat-s3c24xx/pwm.c
+++ b/arch/arm/plat-s3c24xx/pwm.c
@@ -363,7 +363,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.5.6.5


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

* [PATCH] move sc26xx_driver_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (13 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move s3c_pwm_remove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move spidev_remove " Uwe Kleine-König
                   ` (8 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function pxa_camera_remove is used only wrapped by __devexit_p so
define it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 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 e0be11c..11cba07 100644
--- a/drivers/serial/sc26xx.c
+++ b/drivers/serial/sc26xx.c
@@ -709,7 +709,7 @@ out_free_port:
 }
 
 
-static int __exit sc26xx_driver_remove(struct platform_device *dev)
+static int __devexit sc26xx_driver_remove(struct platform_device *dev)
 {
 	struct uart_sc26xx_port *up = dev_get_drvdata(&dev->dev);
 
-- 
1.5.6.5


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

* [PATCH] move spidev_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (14 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move sc26xx_driver_remove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move stex_remove " Uwe Kleine-König
                   ` (7 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function spidev_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 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 5d869c4..955867b 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -605,7 +605,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.5.6.5


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

* [PATCH] move stex_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (15 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move spidev_remove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move stli_pciremove " Uwe Kleine-König
                   ` (6 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function stex_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 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 a3a18ad..4f34cd6 100644
--- a/drivers/scsi/stex.c
+++ b/drivers/scsi/stex.c
@@ -1260,7 +1260,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.5.6.5


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

* [PATCH] move stli_pciremove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (16 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move stex_remove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move vhci_hcd_remove " Uwe Kleine-König
                   ` (5 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function stli_pciremove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/char/istallion.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index 5c3dc6b..41f42eb 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -3802,7 +3802,7 @@ err:
 	return retval;
 }
 
-static void stli_pciremove(struct pci_dev *pdev)
+static void __devexit stli_pciremove(struct pci_dev *pdev)
 {
 	struct stlibrd *brdp = pci_get_drvdata(pdev);
 
-- 
1.5.6.5


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

* [PATCH] move vhci_hcd_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (17 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move stli_pciremove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move virtballoon_remove " Uwe Kleine-König
                   ` (4 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function vhci_hcd_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 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 f69ca34..fae0b85 100644
--- a/drivers/staging/usbip/vhci_hcd.c
+++ b/drivers/staging/usbip/vhci_hcd.c
@@ -1119,7 +1119,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.5.6.5


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

* [PATCH] move virtballoon_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (18 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move vhci_hcd_remove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move virtblk_remove " Uwe Kleine-König
                   ` (3 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function virtballoon_remove is used only wrapped by __devexit_p so
define it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 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 5926826..9c6551f 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -250,7 +250,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.5.6.5


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

* [PATCH] move virtblk_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (19 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move virtballoon_remove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move virtnet_remove " Uwe Kleine-König
                   ` (2 subsequent siblings)
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function virtblk_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/block/virtio_blk.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 5d34764..b63b22f 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -330,7 +330,7 @@ out:
 	return err;
 }
 
-static void virtblk_remove(struct virtio_device *vdev)
+static void __devexit virtblk_remove(struct virtio_device *vdev)
 {
 	struct virtio_blk *vblk = vdev->priv;
 
-- 
1.5.6.5


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

* [PATCH] move virtnet_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (20 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move virtblk_remove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 13:52 ` [PATCH] move virtrng_remove " Uwe Kleine-König
  2009-01-12 14:14 ` wrong usage of __devexit_p and __exit_p Sam Ravnborg
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function virtnet_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 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 43f6523..3550f67 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -752,7 +752,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.5.6.5


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

* [PATCH] move virtrng_remove to .devexit.text
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (21 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move virtnet_remove " Uwe Kleine-König
@ 2009-01-12 13:52 ` Uwe Kleine-König
  2009-01-12 14:14 ` wrong usage of __devexit_p and __exit_p Sam Ravnborg
  23 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 13:52 UTC (permalink / raw)
  To: linux-kernel

The function virtrng_remove is used only wrapped by __devexit_p so define
it using __devexit.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 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 d0e563e..8cb8061 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -108,7 +108,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.5.6.5


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

* Re: wrong usage of __devexit_p and __exit_p
  2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
                   ` (22 preceding siblings ...)
  2009-01-12 13:52 ` [PATCH] move virtrng_remove " Uwe Kleine-König
@ 2009-01-12 14:14 ` Sam Ravnborg
  2009-01-12 14:43   ` Uwe Kleine-König
  23 siblings, 1 reply; 31+ messages in thread
From: Sam Ravnborg @ 2009-01-12 14:14 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kernel

On Mon, Jan 12, 2009 at 02:50:57PM +0100, Uwe Kleine-König wrote:
> Hello,
> 
> I found several drivers that use __devexit_p and __exit_p on functions
> that don't live in .devexit.text or .exit.text resp.
> 
> The impact is either that these functions use memory without being used
> or that they don't link.
> 
> I send 24 patches as a reply to this mail.  I choosed to move the
> functions into the respective function instead of using the right
> __{dev,}exit_p wrapper because it seems to me to have less impact.
> 
> I didn't made the effort to find out the right people to Cc: but I hope
> that Andrew takes care of that :-)

Did you check that this did not introduce any new Section mismatch warnings?
We have seen several __exit annotated functions that was used from __init
annotated code or even from normal code.
Thus the __exit annotation was wrong in these cases.

	Sam

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

* Re: wrong usage of __devexit_p and __exit_p
  2009-01-12 14:14 ` wrong usage of __devexit_p and __exit_p Sam Ravnborg
@ 2009-01-12 14:43   ` Uwe Kleine-König
  2009-01-12 20:55     ` Uwe Kleine-König
  0 siblings, 1 reply; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 14:43 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kernel

On Mon, Jan 12, 2009 at 03:14:57PM +0100, Sam Ravnborg wrote:
> On Mon, Jan 12, 2009 at 02:50:57PM +0100, Uwe Kleine-König wrote:
> > Hello,
> > 
> > I found several drivers that use __devexit_p and __exit_p on functions
> > that don't live in .devexit.text or .exit.text resp.
> > 
> > The impact is either that these functions use memory without being used
> > or that they don't link.
> > 
> > I send 24 patches as a reply to this mail.  I choosed to move the
> > functions into the respective function instead of using the right
> > __{dev,}exit_p wrapper because it seems to me to have less impact.
> > 
> > I didn't made the effort to find out the right people to Cc: but I hope
> > that Andrew takes care of that :-)
> 
> Did you check that this did not introduce any new Section mismatch warnings?
> We have seen several __exit annotated functions that was used from __init
> annotated code or even from normal code.
> Thus the __exit annotation was wrong in these cases.
I wrote in the commit logs, that the functions are only used as argument
to __{dev,}exit_p.  There are no direct calls. (IIRC there was only one
exception that I checked manually.)

I think the __{dev,}exit_p wrappers are only used to define remove
callbacks, so there should be no harm.

Best regards and thanks for your feedback,
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
Peiner Strasse 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686              | Fax:   +49-5121-206917-5555 |

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

* Re: wrong usage of __devexit_p and __exit_p
  2009-01-12 14:43   ` Uwe Kleine-König
@ 2009-01-12 20:55     ` Uwe Kleine-König
  2009-01-12 21:21       ` Sam Ravnborg
  0 siblings, 1 reply; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 20:55 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kernel

Hello Sam,

> > Did you check that this did not introduce any new Section mismatch warnings?
> > We have seen several __exit annotated functions that was used from __init
> > annotated code or even from normal code.
> > Thus the __exit annotation was wrong in these cases.
> I wrote in the commit logs, that the functions are only used as argument
> to __{dev,}exit_p.  There are no direct calls. (IIRC there was only one
> exception that I checked manually.)
Actually the case I remembered here isn't part of the series.
 
> I think the __{dev,}exit_p wrappers are only used to define remove
> callbacks, so there should be no harm.
In the meantime I checked this:

	~/gsrc/linux-2.6$ git diff-tree -r linus/master expsec-master | cut -f 2 | xargs grep -h -E '__(dev)?exit_p'
		.remove		= __devexit_p(s3c_adc_remove),
		.remove		= __devexit_p(s3c_pwm_remove),
		.remove =	__devexit_p(virtblk_remove),
		.remove =	__devexit_p(virtrng_remove),
		.remove = __devexit_p(stli_pciremove)
		.remove   = __devexit_p(hifn_remove),
		.remove = __devexit_p(mpc85xx_pci_err_remove),
		.remove = __devexit_p(mv64x60_pci_err_remove),
		.remove		= __devexit_p(max7301_remove),
		.remove		= __devexit_p(bbc_remove),
		.remove		= __devexit_p(grover_remove),
		.remove		= __exit_p(pxa_camera_remove),
		.remove		= __devexit_p(asic3_remove),
		.remove   = __devexit_p(ilo_remove),
		.remove = __exit_p(mxcnd_remove),
		.remove =	__devexit_p(virtnet_remove),
		.remove		= __devexit_p(atp870u_remove),
		.remove		= __devexit_p(megaraid_detach_one),
		.remove		= __devexit_p(stex_remove),
		.remove		= __devexit_p(jsm_remove_one),
		.remove	= __devexit_p(sc26xx_driver_remove),
		.remove =	__devexit_p(spidev_remove),
		.remove	= __devexit_p(vhci_hcd_remove),
		.remove =	__devexit_p(virtballoon_remove),

So in the patched files __(dev)?exit_p is only used to fill struct
members.  Provided this is the only usage of the respective
functions---and I checked that---it doesn't make sense that they don't
live in .devexit.text (or .exit.text respectively).

Does it make sence for you, too?

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
Peiner Strasse 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686              | Fax:   +49-5121-206917-5555 |

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

* Re: wrong usage of __devexit_p and __exit_p
  2009-01-12 20:55     ` Uwe Kleine-König
@ 2009-01-12 21:21       ` Sam Ravnborg
  2009-01-12 22:15         ` Uwe Kleine-König
  0 siblings, 1 reply; 31+ messages in thread
From: Sam Ravnborg @ 2009-01-12 21:21 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kernel

On Mon, Jan 12, 2009 at 09:55:20PM +0100, Uwe Kleine-König wrote:
> Hello Sam,
> 
> > > Did you check that this did not introduce any new Section mismatch warnings?
> > > We have seen several __exit annotated functions that was used from __init
> > > annotated code or even from normal code.
> > > Thus the __exit annotation was wrong in these cases.
> > I wrote in the commit logs, that the functions are only used as argument
> > to __{dev,}exit_p.  There are no direct calls. (IIRC there was only one
> > exception that I checked manually.)
> Actually the case I remembered here isn't part of the series.
>  
> > I think the __{dev,}exit_p wrappers are only used to define remove
> > callbacks, so there should be no harm.
> In the meantime I checked this:
> 
> 	~/gsrc/linux-2.6$ git diff-tree -r linus/master expsec-master | cut -f 2 | xargs grep -h -E '__(dev)?exit_p'
> 		.remove		= __devexit_p(s3c_adc_remove),
> 		.remove		= __devexit_p(s3c_pwm_remove),
> 		.remove =	__devexit_p(virtblk_remove),
> 		.remove =	__devexit_p(virtrng_remove),
> 		.remove = __devexit_p(stli_pciremove)
> 		.remove   = __devexit_p(hifn_remove),
> 		.remove = __devexit_p(mpc85xx_pci_err_remove),
> 		.remove = __devexit_p(mv64x60_pci_err_remove),
> 		.remove		= __devexit_p(max7301_remove),
> 		.remove		= __devexit_p(bbc_remove),
> 		.remove		= __devexit_p(grover_remove),
> 		.remove		= __exit_p(pxa_camera_remove),
> 		.remove		= __devexit_p(asic3_remove),
> 		.remove   = __devexit_p(ilo_remove),
> 		.remove = __exit_p(mxcnd_remove),
> 		.remove =	__devexit_p(virtnet_remove),
> 		.remove		= __devexit_p(atp870u_remove),
> 		.remove		= __devexit_p(megaraid_detach_one),
> 		.remove		= __devexit_p(stex_remove),
> 		.remove		= __devexit_p(jsm_remove_one),
> 		.remove	= __devexit_p(sc26xx_driver_remove),
> 		.remove =	__devexit_p(spidev_remove),
> 		.remove	= __devexit_p(vhci_hcd_remove),
> 		.remove =	__devexit_p(virtballoon_remove),
> 
> So in the patched files __(dev)?exit_p is only used to fill struct
> members.  Provided this is the only usage of the respective
> functions---and I checked that---it doesn't make sense that they don't
> live in .devexit.text (or .exit.text respectively).
> 
> Does it make sence for you, too?

Yes - if I understood you correct.

You already convinced me with your first mail that you had checked
that the functions was not used for anything else then the exit path.

	Sam

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

* Re: wrong usage of __devexit_p and __exit_p
  2009-01-12 21:21       ` Sam Ravnborg
@ 2009-01-12 22:15         ` Uwe Kleine-König
  2009-01-13  5:37           ` Sam Ravnborg
  0 siblings, 1 reply; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-12 22:15 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kernel

Hello Sam,

On Mon, Jan 12, 2009 at 10:21:09PM +0100, Sam Ravnborg wrote:
> On Mon, Jan 12, 2009 at 09:55:20PM +0100, Uwe Kleine-König wrote:
> > Hello Sam,
> > 
> > > > Did you check that this did not introduce any new Section mismatch warnings?
> > > > We have seen several __exit annotated functions that was used from __init
> > > > annotated code or even from normal code.
> > > > Thus the __exit annotation was wrong in these cases.
> > > I wrote in the commit logs, that the functions are only used as argument
> > > to __{dev,}exit_p.  There are no direct calls. (IIRC there was only one
> > > exception that I checked manually.)
> > Actually the case I remembered here isn't part of the series.
> >  
> > > I think the __{dev,}exit_p wrappers are only used to define remove
> > > callbacks, so there should be no harm.
> > In the meantime I checked this:
> > 
> > 	~/gsrc/linux-2.6$ git diff-tree -r linus/master expsec-master | cut -f 2 | xargs grep -h -E '__(dev)?exit_p'
> > 		.remove		= __devexit_p(s3c_adc_remove),
> > 		.remove		= __devexit_p(s3c_pwm_remove),
> > 		.remove =	__devexit_p(virtblk_remove),
> > 		.remove =	__devexit_p(virtrng_remove),
> > 		.remove = __devexit_p(stli_pciremove)
> > 		.remove   = __devexit_p(hifn_remove),
> > 		.remove = __devexit_p(mpc85xx_pci_err_remove),
> > 		.remove = __devexit_p(mv64x60_pci_err_remove),
> > 		.remove		= __devexit_p(max7301_remove),
> > 		.remove		= __devexit_p(bbc_remove),
> > 		.remove		= __devexit_p(grover_remove),
> > 		.remove		= __exit_p(pxa_camera_remove),
> > 		.remove		= __devexit_p(asic3_remove),
> > 		.remove   = __devexit_p(ilo_remove),
> > 		.remove = __exit_p(mxcnd_remove),
> > 		.remove =	__devexit_p(virtnet_remove),
> > 		.remove		= __devexit_p(atp870u_remove),
> > 		.remove		= __devexit_p(megaraid_detach_one),
> > 		.remove		= __devexit_p(stex_remove),
> > 		.remove		= __devexit_p(jsm_remove_one),
> > 		.remove	= __devexit_p(sc26xx_driver_remove),
> > 		.remove =	__devexit_p(spidev_remove),
> > 		.remove	= __devexit_p(vhci_hcd_remove),
> > 		.remove =	__devexit_p(virtballoon_remove),
> > 
> > So in the patched files __(dev)?exit_p is only used to fill struct
> > members.  Provided this is the only usage of the respective
> > functions---and I checked that---it doesn't make sense that they don't
> > live in .devexit.text (or .exit.text respectively).
> > 
> > Does it make sence for you, too?
> 
> Yes - if I understood you correct.
> 
> You already convinced me with your first mail that you had checked
> that the functions was not used for anything else then the exit path.
So I can interpret this as a general Acked-by:?

Best regards and thanks,
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
Peiner Strasse 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686              | Fax:   +49-5121-206917-5555 |

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

* Re: wrong usage of __devexit_p and __exit_p
  2009-01-12 22:15         ` Uwe Kleine-König
@ 2009-01-13  5:37           ` Sam Ravnborg
  2009-01-13 20:54             ` Uwe Kleine-König
  0 siblings, 1 reply; 31+ messages in thread
From: Sam Ravnborg @ 2009-01-13  5:37 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: linux-kernel

On Mon, Jan 12, 2009 at 11:15:00PM +0100, Uwe Kleine-König wrote:
> Hello Sam,
> 
> On Mon, Jan 12, 2009 at 10:21:09PM +0100, Sam Ravnborg wrote:
> > On Mon, Jan 12, 2009 at 09:55:20PM +0100, Uwe Kleine-König wrote:
> > > Hello Sam,
> > > 
> > > > > Did you check that this did not introduce any new Section mismatch warnings?
> > > > > We have seen several __exit annotated functions that was used from __init
> > > > > annotated code or even from normal code.
> > > > > Thus the __exit annotation was wrong in these cases.
> > > > I wrote in the commit logs, that the functions are only used as argument
> > > > to __{dev,}exit_p.  There are no direct calls. (IIRC there was only one
> > > > exception that I checked manually.)
> > > Actually the case I remembered here isn't part of the series.
> > >  
> > > > I think the __{dev,}exit_p wrappers are only used to define remove
> > > > callbacks, so there should be no harm.
> > > In the meantime I checked this:
> > > 
> > > 	~/gsrc/linux-2.6$ git diff-tree -r linus/master expsec-master | cut -f 2 | xargs grep -h -E '__(dev)?exit_p'
> > > 		.remove		= __devexit_p(s3c_adc_remove),
> > > 		.remove		= __devexit_p(s3c_pwm_remove),
> > > 		.remove =	__devexit_p(virtblk_remove),
> > > 		.remove =	__devexit_p(virtrng_remove),
> > > 		.remove = __devexit_p(stli_pciremove)
> > > 		.remove   = __devexit_p(hifn_remove),
> > > 		.remove = __devexit_p(mpc85xx_pci_err_remove),
> > > 		.remove = __devexit_p(mv64x60_pci_err_remove),
> > > 		.remove		= __devexit_p(max7301_remove),
> > > 		.remove		= __devexit_p(bbc_remove),
> > > 		.remove		= __devexit_p(grover_remove),
> > > 		.remove		= __exit_p(pxa_camera_remove),
> > > 		.remove		= __devexit_p(asic3_remove),
> > > 		.remove   = __devexit_p(ilo_remove),
> > > 		.remove = __exit_p(mxcnd_remove),
> > > 		.remove =	__devexit_p(virtnet_remove),
> > > 		.remove		= __devexit_p(atp870u_remove),
> > > 		.remove		= __devexit_p(megaraid_detach_one),
> > > 		.remove		= __devexit_p(stex_remove),
> > > 		.remove		= __devexit_p(jsm_remove_one),
> > > 		.remove	= __devexit_p(sc26xx_driver_remove),
> > > 		.remove =	__devexit_p(spidev_remove),
> > > 		.remove	= __devexit_p(vhci_hcd_remove),
> > > 		.remove =	__devexit_p(virtballoon_remove),
> > > 
> > > So in the patched files __(dev)?exit_p is only used to fill struct
> > > members.  Provided this is the only usage of the respective
> > > functions---and I checked that---it doesn't make sense that they don't
> > > live in .devexit.text (or .exit.text respectively).
> > > 
> > > Does it make sence for you, too?
> > 
> > Yes - if I understood you correct.
> > 
> > You already convinced me with your first mail that you had checked
> > that the functions was not used for anything else then the exit path.
> So I can interpret this as a general Acked-by:?

Yes.

	Sam

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

* Re: wrong usage of __devexit_p and __exit_p
  2009-01-13  5:37           ` Sam Ravnborg
@ 2009-01-13 20:54             ` Uwe Kleine-König
  0 siblings, 0 replies; 31+ messages in thread
From: Uwe Kleine-König @ 2009-01-13 20:54 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kernel

Hello Sam,

> > > You already convinced me with your first mail that you had checked
> > > that the functions was not used for anything else then the exit path.
> > So I can interpret this as a general Acked-by:?
> 
> Yes.
The complete (topgit-controlled) series is now available at

	git://git.pengutronix.de/git/ukl/linux-2.6.git expsec-master

with your Acked-by.

Up to now I didn't get any feedback apart from your's. Maybe I need to
find the right people to Cc: myself. :-|

Best regards
Uwe

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

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

end of thread, other threads:[~2009-01-13 20:54 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-12 13:50 wrong usage of __devexit_p and __exit_p Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move asic3_remove to .devexit.text Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move bbc_remove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move grover_remove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move hifn_remove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move ilo_remove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move jsm_remove_one " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move max7301_remove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move megaraid_detach_one " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move mpc85xx_pci_err_remove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move mv64x60_pci_err_remove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move mxcnd_remove to .exit.text Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move pxa_camera_remove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move s3c_adc_remove to .devexit.text Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move s3c_pwm_remove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move sc26xx_driver_remove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move spidev_remove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move stex_remove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move stli_pciremove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move vhci_hcd_remove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move virtballoon_remove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move virtblk_remove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move virtnet_remove " Uwe Kleine-König
2009-01-12 13:52 ` [PATCH] move virtrng_remove " Uwe Kleine-König
2009-01-12 14:14 ` wrong usage of __devexit_p and __exit_p Sam Ravnborg
2009-01-12 14:43   ` Uwe Kleine-König
2009-01-12 20:55     ` Uwe Kleine-König
2009-01-12 21:21       ` Sam Ravnborg
2009-01-12 22:15         ` Uwe Kleine-König
2009-01-13  5:37           ` Sam Ravnborg
2009-01-13 20:54             ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).