* [PATCH] mfd:fix section mismatch in ab3550-core
@ 2011-08-03 8:02 Wanlong Gao
2011-08-03 8:32 ` Uwe Kleine-König
0 siblings, 1 reply; 9+ messages in thread
From: Wanlong Gao @ 2011-08-03 8:02 UTC (permalink / raw)
To: linux-arm-kernel
Move the __init to __devinit for section mismatch fixing.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
---
drivers/mfd/ab3550-core.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mfd/ab3550-core.c b/drivers/mfd/ab3550-core.c
index 56ba194..703401c 100644
--- a/drivers/mfd/ab3550-core.c
+++ b/drivers/mfd/ab3550-core.c
@@ -1086,7 +1086,7 @@ static inline void ab3550_remove_debugfs(void)
* This sets up a default config in the AB3550 chip so that it
* will work as expected.
*/
-static int __init ab3550_setup(struct ab3550 *ab)
+static int __devinit ab3550_setup(struct ab3550 *ab)
{
int err = 0;
int i;
@@ -1193,7 +1193,7 @@ struct ab_family_id {
char *name;
};
-static const struct ab_family_id ids[] __initdata = {
+static const struct ab_family_id ids[] __devinitdata = {
/* AB3550 */
{
.id = AB3550_P1A,
@@ -1205,7 +1205,7 @@ static const struct ab_family_id ids[] __initdata = {
}
};
-static int __init ab3550_probe(struct i2c_client *client,
+static int __devinit ab3550_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct ab3550 *ab;
@@ -1326,7 +1326,7 @@ exit_no_detect:
return err;
}
-static int __exit ab3550_remove(struct i2c_client *client)
+static int __devexit ab3550_remove(struct i2c_client *client)
{
struct ab3550 *ab = i2c_get_clientdata(client);
int num_i2c_clients = AB3550_NUM_BANKS;
@@ -1359,7 +1359,7 @@ static struct i2c_driver ab3550_driver = {
},
.id_table = ab3550_id,
.probe = ab3550_probe,
- .remove = __exit_p(ab3550_remove),
+ .remove = __devexit_p(ab3550_remove),
};
static int __init ab3550_i2c_init(void)
--
1.7.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] mfd:fix section mismatch in ab3550-core
2011-08-03 8:02 [PATCH] mfd:fix section mismatch in ab3550-core Wanlong Gao
@ 2011-08-03 8:32 ` Uwe Kleine-König
2011-08-03 8:57 ` [PATCH v2] mfd:fix section mismatch warning " Wanlong Gao
2011-08-04 4:32 ` Wanlong Gao
0 siblings, 2 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2011-08-03 8:32 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Aug 03, 2011 at 04:02:30PM +0800, Wanlong Gao wrote:
> Move the __init to __devinit for section mismatch fixing.
>
> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Adding the mismatch warning that is fixed by the patch would be nice.
> ---
> drivers/mfd/ab3550-core.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/mfd/ab3550-core.c b/drivers/mfd/ab3550-core.c
> index 56ba194..703401c 100644
> --- a/drivers/mfd/ab3550-core.c
> +++ b/drivers/mfd/ab3550-core.c
> @@ -1086,7 +1086,7 @@ static inline void ab3550_remove_debugfs(void)
> * This sets up a default config in the AB3550 chip so that it
> * will work as expected.
> */
> -static int __init ab3550_setup(struct ab3550 *ab)
> +static int __devinit ab3550_setup(struct ab3550 *ab)
> {
> int err = 0;
> int i;
> @@ -1193,7 +1193,7 @@ struct ab_family_id {
> char *name;
> };
>
> -static const struct ab_family_id ids[] __initdata = {
> +static const struct ab_family_id ids[] __devinitdata = {
This is wrong. const data must use __devinitconst. (And __initdata was
also wrong, should have been __initconst.)
Other than that the patch looks OK.
Uwe
> /* AB3550 */
> {
> .id = AB3550_P1A,
> @@ -1205,7 +1205,7 @@ static const struct ab_family_id ids[] __initdata = {
> }
> };
>
> -static int __init ab3550_probe(struct i2c_client *client,
> +static int __devinit ab3550_probe(struct i2c_client *client,
> const struct i2c_device_id *id)
> {
> struct ab3550 *ab;
> @@ -1326,7 +1326,7 @@ exit_no_detect:
> return err;
> }
>
> -static int __exit ab3550_remove(struct i2c_client *client)
> +static int __devexit ab3550_remove(struct i2c_client *client)
> {
> struct ab3550 *ab = i2c_get_clientdata(client);
> int num_i2c_clients = AB3550_NUM_BANKS;
> @@ -1359,7 +1359,7 @@ static struct i2c_driver ab3550_driver = {
> },
> .id_table = ab3550_id,
> .probe = ab3550_probe,
> - .remove = __exit_p(ab3550_remove),
> + .remove = __devexit_p(ab3550_remove),
> };
>
> static int __init ab3550_i2c_init(void)
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2] mfd:fix section mismatch warning in ab3550-core
2011-08-03 8:32 ` Uwe Kleine-König
@ 2011-08-03 8:57 ` Wanlong Gao
2011-08-03 10:19 ` Linus Walleij
2011-08-04 4:32 ` Wanlong Gao
1 sibling, 1 reply; 9+ messages in thread
From: Wanlong Gao @ 2011-08-03 8:57 UTC (permalink / raw)
To: linux-arm-kernel
WARNING: drivers/mfd/built-in.o(.data+0x9998): Section mismatch in reference from the variable ab3550_driver to the function .init.text:ab3550_probe()
The variable ab3550_driver references
the function __init ab3550_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
---
drivers/mfd/ab3550-core.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mfd/ab3550-core.c b/drivers/mfd/ab3550-core.c
index 56ba194..882ea71 100644
--- a/drivers/mfd/ab3550-core.c
+++ b/drivers/mfd/ab3550-core.c
@@ -1086,7 +1086,7 @@ static inline void ab3550_remove_debugfs(void)
* This sets up a default config in the AB3550 chip so that it
* will work as expected.
*/
-static int __init ab3550_setup(struct ab3550 *ab)
+static int __devinit ab3550_setup(struct ab3550 *ab)
{
int err = 0;
int i;
@@ -1193,7 +1193,7 @@ struct ab_family_id {
char *name;
};
-static const struct ab_family_id ids[] __initdata = {
+static const struct ab_family_id ids[] __devinitconst = {
/* AB3550 */
{
.id = AB3550_P1A,
@@ -1205,7 +1205,7 @@ static const struct ab_family_id ids[] __initdata = {
}
};
-static int __init ab3550_probe(struct i2c_client *client,
+static int __devinit ab3550_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct ab3550 *ab;
@@ -1326,7 +1326,7 @@ exit_no_detect:
return err;
}
-static int __exit ab3550_remove(struct i2c_client *client)
+static int __devexit ab3550_remove(struct i2c_client *client)
{
struct ab3550 *ab = i2c_get_clientdata(client);
int num_i2c_clients = AB3550_NUM_BANKS;
@@ -1359,7 +1359,7 @@ static struct i2c_driver ab3550_driver = {
},
.id_table = ab3550_id,
.probe = ab3550_probe,
- .remove = __exit_p(ab3550_remove),
+ .remove = __devexit_p(ab3550_remove),
};
static int __init ab3550_i2c_init(void)
--
1.7.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2] mfd:fix section mismatch warning in ab3550-core
2011-08-03 8:57 ` [PATCH v2] mfd:fix section mismatch warning " Wanlong Gao
@ 2011-08-03 10:19 ` Linus Walleij
2011-08-03 11:43 ` Uwe Kleine-König
0 siblings, 1 reply; 9+ messages in thread
From: Linus Walleij @ 2011-08-03 10:19 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Aug 3, 2011 at 10:57 AM, Wanlong Gao <gaowanlong@cn.fujitsu.com> wrote:
> WARNING: drivers/mfd/built-in.o(.data+0x9998): Section mismatch in reference from the variable ab3550_driver to the function .init.text:ab3550_probe()
> The variable ab3550_driver references
> the function __init ab3550_probe()
> If the reference is valid then annotate the
> variable with __init* or __refdata (see linux/init.h) or name the variable:
> *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
>
> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Thanks!
Linus Walleij
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2] mfd:fix section mismatch warning in ab3550-core
2011-08-03 10:19 ` Linus Walleij
@ 2011-08-03 11:43 ` Uwe Kleine-König
0 siblings, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2011-08-03 11:43 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Aug 03, 2011 at 12:19:06PM +0200, Linus Walleij wrote:
> On Wed, Aug 3, 2011 at 10:57 AM, Wanlong Gao <gaowanlong@cn.fujitsu.com> wrote:
>
Maybe add "This patch fixes:" before the actual warning?
> > WARNING: drivers/mfd/built-in.o(.data+0x9998): Section mismatch in reference from the variable ab3550_driver to the function .init.text:ab3550_probe()
> > The variable ab3550_driver references
> > the function __init ab3550_probe()
> > If the reference is valid then annotate the
> > variable with __init* or __refdata (see linux/init.h) or name the variable:
> > *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
> >
> > Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
other than that, aol:
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3] mfd:fix section mismatch warning in ab3550-core
2011-08-03 8:32 ` Uwe Kleine-König
@ 2011-08-04 4:32 ` Wanlong Gao
2011-08-04 4:32 ` Wanlong Gao
1 sibling, 0 replies; 9+ messages in thread
From: Wanlong Gao @ 2011-08-04 4:32 UTC (permalink / raw)
To: u.kleine-koenig
Cc: Wanlong Gao, linux-arm-kernel, sameo, linus.walleij,
srinidhi.kasagar, linux-kernel
This patch fixes:
WARNING: drivers/mfd/built-in.o(.data+0x9998): Section mismatch in reference from the variable ab3550_driver to the function .init.text:ab3550_probe()
The variable ab3550_driver references
the function __init ab3550_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/mfd/ab3550-core.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mfd/ab3550-core.c b/drivers/mfd/ab3550-core.c
index 56ba194..882ea71 100644
--- a/drivers/mfd/ab3550-core.c
+++ b/drivers/mfd/ab3550-core.c
@@ -1086,7 +1086,7 @@ static inline void ab3550_remove_debugfs(void)
* This sets up a default config in the AB3550 chip so that it
* will work as expected.
*/
-static int __init ab3550_setup(struct ab3550 *ab)
+static int __devinit ab3550_setup(struct ab3550 *ab)
{
int err = 0;
int i;
@@ -1193,7 +1193,7 @@ struct ab_family_id {
char *name;
};
-static const struct ab_family_id ids[] __initdata = {
+static const struct ab_family_id ids[] __devinitconst = {
/* AB3550 */
{
.id = AB3550_P1A,
@@ -1205,7 +1205,7 @@ static const struct ab_family_id ids[] __initdata = {
}
};
-static int __init ab3550_probe(struct i2c_client *client,
+static int __devinit ab3550_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct ab3550 *ab;
@@ -1326,7 +1326,7 @@ exit_no_detect:
return err;
}
-static int __exit ab3550_remove(struct i2c_client *client)
+static int __devexit ab3550_remove(struct i2c_client *client)
{
struct ab3550 *ab = i2c_get_clientdata(client);
int num_i2c_clients = AB3550_NUM_BANKS;
@@ -1359,7 +1359,7 @@ static struct i2c_driver ab3550_driver = {
},
.id_table = ab3550_id,
.probe = ab3550_probe,
- .remove = __exit_p(ab3550_remove),
+ .remove = __devexit_p(ab3550_remove),
};
static int __init ab3550_i2c_init(void)
--
1.7.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v3] mfd:fix section mismatch warning in ab3550-core
@ 2011-08-04 4:32 ` Wanlong Gao
0 siblings, 0 replies; 9+ messages in thread
From: Wanlong Gao @ 2011-08-04 4:32 UTC (permalink / raw)
To: linux-arm-kernel
This patch fixes:
WARNING: drivers/mfd/built-in.o(.data+0x9998): Section mismatch in reference from the variable ab3550_driver to the function .init.text:ab3550_probe()
The variable ab3550_driver references
the function __init ab3550_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
drivers/mfd/ab3550-core.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mfd/ab3550-core.c b/drivers/mfd/ab3550-core.c
index 56ba194..882ea71 100644
--- a/drivers/mfd/ab3550-core.c
+++ b/drivers/mfd/ab3550-core.c
@@ -1086,7 +1086,7 @@ static inline void ab3550_remove_debugfs(void)
* This sets up a default config in the AB3550 chip so that it
* will work as expected.
*/
-static int __init ab3550_setup(struct ab3550 *ab)
+static int __devinit ab3550_setup(struct ab3550 *ab)
{
int err = 0;
int i;
@@ -1193,7 +1193,7 @@ struct ab_family_id {
char *name;
};
-static const struct ab_family_id ids[] __initdata = {
+static const struct ab_family_id ids[] __devinitconst = {
/* AB3550 */
{
.id = AB3550_P1A,
@@ -1205,7 +1205,7 @@ static const struct ab_family_id ids[] __initdata = {
}
};
-static int __init ab3550_probe(struct i2c_client *client,
+static int __devinit ab3550_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct ab3550 *ab;
@@ -1326,7 +1326,7 @@ exit_no_detect:
return err;
}
-static int __exit ab3550_remove(struct i2c_client *client)
+static int __devexit ab3550_remove(struct i2c_client *client)
{
struct ab3550 *ab = i2c_get_clientdata(client);
int num_i2c_clients = AB3550_NUM_BANKS;
@@ -1359,7 +1359,7 @@ static struct i2c_driver ab3550_driver = {
},
.id_table = ab3550_id,
.probe = ab3550_probe,
- .remove = __exit_p(ab3550_remove),
+ .remove = __devexit_p(ab3550_remove),
};
static int __init ab3550_i2c_init(void)
--
1.7.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v3] mfd:fix section mismatch warning in ab3550-core
2011-08-04 4:32 ` Wanlong Gao
@ 2011-08-21 23:09 ` Samuel Ortiz
-1 siblings, 0 replies; 9+ messages in thread
From: Samuel Ortiz @ 2011-08-21 23:09 UTC (permalink / raw)
To: Wanlong Gao
Cc: u.kleine-koenig, linux-arm-kernel, linus.walleij,
srinidhi.kasagar, linux-kernel
Hi Gao,
On Thu, Aug 04, 2011 at 12:32:31PM +0800, Wanlong Gao wrote:
> This patch fixes:
> WARNING: drivers/mfd/built-in.o(.data+0x9998): Section mismatch in reference from the variable ab3550_driver to the function .init.text:ab3550_probe()
> The variable ab3550_driver references
> the function __init ab3550_probe()
> If the reference is valid then annotate the
> variable with __init* or __refdata (see linux/init.h) or name the variable:
> *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
>
> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Patch applied, thanks a lot.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v3] mfd:fix section mismatch warning in ab3550-core
@ 2011-08-21 23:09 ` Samuel Ortiz
0 siblings, 0 replies; 9+ messages in thread
From: Samuel Ortiz @ 2011-08-21 23:09 UTC (permalink / raw)
To: linux-arm-kernel
Hi Gao,
On Thu, Aug 04, 2011 at 12:32:31PM +0800, Wanlong Gao wrote:
> This patch fixes:
> WARNING: drivers/mfd/built-in.o(.data+0x9998): Section mismatch in reference from the variable ab3550_driver to the function .init.text:ab3550_probe()
> The variable ab3550_driver references
> the function __init ab3550_probe()
> If the reference is valid then annotate the
> variable with __init* or __refdata (see linux/init.h) or name the variable:
> *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
>
> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Patch applied, thanks a lot.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-08-21 23:09 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-03 8:02 [PATCH] mfd:fix section mismatch in ab3550-core Wanlong Gao
2011-08-03 8:32 ` Uwe Kleine-König
2011-08-03 8:57 ` [PATCH v2] mfd:fix section mismatch warning " Wanlong Gao
2011-08-03 10:19 ` Linus Walleij
2011-08-03 11:43 ` Uwe Kleine-König
2011-08-04 4:32 ` [PATCH v3] " Wanlong Gao
2011-08-04 4:32 ` Wanlong Gao
2011-08-21 23:09 ` Samuel Ortiz
2011-08-21 23:09 ` Samuel Ortiz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.