* [PATCH 1/2] OMAP: Kill compile warnings
@ 2007-05-25 23:04 nishanth menon
2007-05-25 23:12 ` Tony Lindgren
0 siblings, 1 reply; 8+ messages in thread
From: nishanth menon @ 2007-05-25 23:04 UTC (permalink / raw)
To: Linux OMAP
Got the subject wrong last time.. Sorry..
kill warning1: remove link to .init.text
omap_timer refers to __init omap2_gp_timer_init function causing a warning
while the linking is done
Signed-off-by: Nishanth Menon <menon.nishanth@gmail.com>
---
arch/arm/mach-omap2/timer-gp.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index 8f380a1..f4cf6fe 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -175,6 +175,6 @@ static void __init omap2_gp_timer_init(void)
omap2_gp_clocksource_init();
}
-struct sys_timer omap_timer = {
- .init = omap2_gp_timer_init,
+struct sys_timer omap_timer __initdata = {
+ .init = omap2_gp_timer_init,
};
--
1.5.0.6
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] OMAP: Kill compile warnings
2007-05-25 23:04 [PATCH 1/2] OMAP: Kill compile warnings nishanth menon
@ 2007-05-25 23:12 ` Tony Lindgren
2007-05-25 23:17 ` Syed Mohammed, Khasim
0 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2007-05-25 23:12 UTC (permalink / raw)
To: nishanth menon; +Cc: Linux OMAP
* nishanth menon <menon.nishanth@gmail.com> [070525 16:05]:
> Got the subject wrong last time.. Sorry..
> kill warning1: remove link to .init.text
> omap_timer refers to __init omap2_gp_timer_init function causing a warning
> while the linking is done
>
> Signed-off-by: Nishanth Menon <menon.nishanth@gmail.com>
> ---
> arch/arm/mach-omap2/timer-gp.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/timer-gp.c
> b/arch/arm/mach-omap2/timer-gp.c
> index 8f380a1..f4cf6fe 100644
> --- a/arch/arm/mach-omap2/timer-gp.c
> +++ b/arch/arm/mach-omap2/timer-gp.c
> @@ -175,6 +175,6 @@ static void __init omap2_gp_timer_init(void)
> omap2_gp_clocksource_init();
> }
>
> -struct sys_timer omap_timer = {
> - .init = omap2_gp_timer_init,
> +struct sys_timer omap_timer __initdata = {
> + .init = omap2_gp_timer_init,
> };
> --
This warning is wrong, and we cannot mark sys_timer as initdata. See
other mails related to this on this list. I'd assume this will get fixed
once sys_timer is added to the list of things to ignore.
Tony
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH 1/2] OMAP: Kill compile warnings
2007-05-25 23:12 ` Tony Lindgren
@ 2007-05-25 23:17 ` Syed Mohammed, Khasim
2007-05-25 23:23 ` nishanth menon
0 siblings, 1 reply; 8+ messages in thread
From: Syed Mohammed, Khasim @ 2007-05-25 23:17 UTC (permalink / raw)
To: Tony Lindgren, nishanth menon; +Cc: Linux OMAP
>
>This warning is wrong, and we cannot mark sys_timer as initdata. See
>other mails related to this on this list. I'd assume this will get fixed
>once sys_timer is added to the list of things to ignore.
>
>Tony
Yes, I had a similar discussion with Dirk, he passed me few pointers yesterday, please see through if it helps....
-----Original Message-----
From: Dirk Behme [mailto:dirk.behme@googlemail.com]
Sent: Friday, May 25, 2007 7:56 AM
To: Syed Mohammed, Khasim
Subject: Re: Compiler warning in omap-twl4030keypad.c
Syed Mohammed, Khasim wrote:
> Hi Dirk,
>
> Thanks for the info. I was kind of busy with other stuff. Will look into
> this later this week and submit a patch.
I got the following stuff from Felipe Balbi regarding this in private
mail:
1) -- cut --
I don't think the problem is with TI's code for the omap-twl4030. If
you check the definition of struct input_dev, at
include/linux/input.h:
union { /* temporarily so while we switching to struct
device */
struct device *parent;
} dev;
Probably, we just need to wait until they switch to struct device
completely.
Or maybe this code will help if we assume that omap_twl4030->cdev->dev
points to the same place as omap_twl4030->dev. I would need any of you
guys to test it:
diff --git a/drivers/input/keyboard/omap-twl4030keypad.c
b/drivers/input/keyboard/omap-twl4030keypad.c
index b96e84f..3776f97 100644
--- a/drivers/input/keyboard/omap-twl4030keypad.c
+++ b/drivers/input/keyboard/omap-twl4030keypad.c
@@ -254,7 +254,7 @@ static int __init omap_kp_probe(struct
platform_device *pdev)
omap_twl4030kp->keycodemax = pdata->keymapsize;
/* Get the debug Device to omap keypad device */
- dbg_dev = &(omap_twl4030kp->dev);
+ dbg_dev = omap_twl4030kp->dev.parent;
ret = input_register_device(omap_twl4030kp);
if (ret < 0) {
-- cut --
2) -- cut --
I forgot to change the text... sorry...
I'm not using the struct class_device here... I'm just accessing the
struct device member inside the union dev.
This is an ugly hack :-P ... but it seems to work.
-- cut --
3) -- cut --
Still a hack, but probably looks better:
diff --git a/drivers/input/keyboard/omap-twl4030keypad.c
b/drivers/input/keyboard/omap-twl4030keypad.c
index b96e84f..5eb3ece 100644
--- a/drivers/input/keyboard/omap-twl4030keypad.c
+++ b/drivers/input/keyboard/omap-twl4030keypad.c
@@ -50,6 +50,8 @@
#define KEYNUM_MASK 0xFF000000
#define ROWCOL_MASK 0x00FFFFFF
+#define get_dbg_dev(d) (d).parent
+
static char *switch_name[NUM_ROWS][NUM_COLS] = {
{"S2_L", "S2_D", "S2_S", "S3", "S4", "S23"},
{"S2_R", "S2_U", "S5", "S6", "S7", "S24"},
@@ -254,7 +256,7 @@ static int __init omap_kp_probe(struct
platform_device *pdev)
omap_twl4030kp->keycodemax = pdata->keymapsize;
/* Get the debug Device to omap keypad device */
- dbg_dev = &(omap_twl4030kp->dev);
+ dbg_dev = get_dbg_dev(omap_twl4030kp->dev);
ret = input_register_device(omap_twl4030kp);
if (ret < 0) {
-- cut --
Regards
Dirk
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] OMAP: Kill compile warnings
2007-05-25 23:17 ` Syed Mohammed, Khasim
@ 2007-05-25 23:23 ` nishanth menon
2007-05-25 23:25 ` Syed Mohammed, Khasim
0 siblings, 1 reply; 8+ messages in thread
From: nishanth menon @ 2007-05-25 23:23 UTC (permalink / raw)
To: Syed Mohammed, Khasim; +Cc: Linux OMAP
Khasim,
On 5/25/07, Syed Mohammed, Khasim <x0khasim@ti.com> wrote:
> Yes, I had a similar discussion with Dirk, he passed me few pointers yesterday, please see through if it helps....
> /* Get the debug Device to omap keypad device */
> - dbg_dev = &(omap_twl4030kp->dev);
> + dbg_dev = omap_twl4030kp->dev.parent;
That would be redundant:
220 /* Get the debug Device */
221 dbg_dev = &(pdev->dev);
already did that for you.. only, now the messages will show
"input:xyz.." instead of "omap_twl4030:xyz"..
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH 1/2] OMAP: Kill compile warnings
2007-05-25 23:23 ` nishanth menon
@ 2007-05-25 23:25 ` Syed Mohammed, Khasim
2007-05-26 5:38 ` Dirk Behme
0 siblings, 1 reply; 8+ messages in thread
From: Syed Mohammed, Khasim @ 2007-05-25 23:25 UTC (permalink / raw)
To: nishanth menon; +Cc: Linux OMAP
>That would be redundant:
>220 /* Get the debug Device */
>221 dbg_dev = &(pdev->dev);
>already did that for you.. only, now the messages will show
>"input:xyz.." instead of "omap_twl4030:xyz"..
OK, thanks.
Acked-by: x0khasim@ti.com
Regards,
Khasim
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] OMAP: Kill compile warnings
2007-05-25 23:25 ` Syed Mohammed, Khasim
@ 2007-05-26 5:38 ` Dirk Behme
2007-06-05 10:11 ` Tony Lindgren
0 siblings, 1 reply; 8+ messages in thread
From: Dirk Behme @ 2007-05-26 5:38 UTC (permalink / raw)
To: Syed Mohammed, Khasim, nishanth menon, Linux OMAP
Syed Mohammed, Khasim wrote:
>> That would be redundant:
>> 220 /* Get the debug Device */
>> 221 dbg_dev = &(pdev->dev);
>> already did that for you.. only, now the messages will show
>> "input:xyz.." instead of "omap_twl4030:xyz"..
>
> OK, thanks.
>
> Acked-by: x0khasim@ti.com
Okay, after 2 minutes thinking about what's so confusing here, I have
it now. We have two different patches with nearly identical subject.
The first one should fix a warning we already discussed under an other
subject. A answer to the second patch was sent under the subject of
the first one ;) Therefore some clarification as I understand it now:
We have two warnings:
1) Section mismatch with sys_timer
This is what "[PATCH 1/2] OMAP: Kill compile warnings" is about.
As mentioned by Tony this patch isn't correct and we will wait (as
discussed already earlier) until this is fixed by ignore list.
http://linux.omap.com/pipermail/linux-omap-open-source/2007-May/010087.html
http://linux.omap.com/pipermail/linux-omap-open-source/2007-May/010061.html
2) Warning in twl4030 keypad about dbg_dev
This is what "[PATCH 2/2] OMAP: Kill compile warnings" is about.
For this we already had an other subject in the list archives as well
"Compiler warning in omap-twl4030keypad.c".
Above Khasim acked it (with misleading subject ;) ) and I also think
it's okay
http://linux.omap.com/pipermail/linux-omap-open-source/2007-May/010086.html
Acked-by: Dirk Behme <dirk.behme@gmail.com>
Conclusion: For (1) we have to wait, for (2) please apply.
Hope that helps a little,
Dirk
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] OMAP: Kill compile warnings
2007-05-26 5:38 ` Dirk Behme
@ 2007-06-05 10:11 ` Tony Lindgren
2007-06-05 10:21 ` Tony Lindgren
0 siblings, 1 reply; 8+ messages in thread
From: Tony Lindgren @ 2007-06-05 10:11 UTC (permalink / raw)
To: Dirk Behme; +Cc: Linux OMAP
* Dirk Behme <dirk.behme@googlemail.com> [070525 23:02]:
> Syed Mohammed, Khasim wrote:
>>> That would be redundant:
>>> 220 /* Get the debug Device */
>>> 221 dbg_dev = &(pdev->dev);
>>> already did that for you.. only, now the messages will show
>>> "input:xyz.." instead of "omap_twl4030:xyz"..
>> OK, thanks. Acked-by: x0khasim@ti.com
>
> Okay, after 2 minutes thinking about what's so confusing here, I have
> it now. We have two different patches with nearly identical subject.
> The first one should fix a warning we already discussed under an other
> subject. A answer to the second patch was sent under the subject of
> the first one ;) Therefore some clarification as I understand it now:
>
> We have two warnings:
>
> 1) Section mismatch with sys_timer
>
> This is what "[PATCH 1/2] OMAP: Kill compile warnings" is about.
>
> As mentioned by Tony this patch isn't correct and we will wait (as
> discussed already earlier) until this is fixed by ignore list.
>
> http://linux.omap.com/pipermail/linux-omap-open-source/2007-May/010087.html
>
> http://linux.omap.com/pipermail/linux-omap-open-source/2007-May/010061.html
>
> 2) Warning in twl4030 keypad about dbg_dev
>
> This is what "[PATCH 2/2] OMAP: Kill compile warnings" is about.
>
> For this we already had an other subject in the list archives as well
> "Compiler warning in omap-twl4030keypad.c".
>
> Above Khasim acked it (with misleading subject ;) ) and I also think
> it's okay
>
> http://linux.omap.com/pipermail/linux-omap-open-source/2007-May/010086.html
>
> Acked-by: Dirk Behme <dirk.behme@gmail.com>
>
> Conclusion: For (1) we have to wait, for (2) please apply.
>
> Hope that helps a little,
Yeah, it's getting complex :) Pushing Felipe's patch posted by Nishant
today.
Tony
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] OMAP: Kill compile warnings
2007-06-05 10:11 ` Tony Lindgren
@ 2007-06-05 10:21 ` Tony Lindgren
0 siblings, 0 replies; 8+ messages in thread
From: Tony Lindgren @ 2007-06-05 10:21 UTC (permalink / raw)
To: Dirk Behme; +Cc: Linux OMAP
* Tony Lindgren <tony@atomide.com> [070605 03:16]:
> * Dirk Behme <dirk.behme@googlemail.com> [070525 23:02]:
> > Syed Mohammed, Khasim wrote:
> >>> That would be redundant:
> >>> 220 /* Get the debug Device */
> >>> 221 dbg_dev = &(pdev->dev);
> >>> already did that for you.. only, now the messages will show
> >>> "input:xyz.." instead of "omap_twl4030:xyz"..
> >> OK, thanks. Acked-by: x0khasim@ti.com
> >
> > Okay, after 2 minutes thinking about what's so confusing here, I have
> > it now. We have two different patches with nearly identical subject.
> > The first one should fix a warning we already discussed under an other
> > subject. A answer to the second patch was sent under the subject of
> > the first one ;) Therefore some clarification as I understand it now:
> >
> > We have two warnings:
> >
> > 1) Section mismatch with sys_timer
> >
> > This is what "[PATCH 1/2] OMAP: Kill compile warnings" is about.
> >
> > As mentioned by Tony this patch isn't correct and we will wait (as
> > discussed already earlier) until this is fixed by ignore list.
> >
> > http://linux.omap.com/pipermail/linux-omap-open-source/2007-May/010087.html
> >
> > http://linux.omap.com/pipermail/linux-omap-open-source/2007-May/010061.html
> >
> > 2) Warning in twl4030 keypad about dbg_dev
> >
> > This is what "[PATCH 2/2] OMAP: Kill compile warnings" is about.
> >
> > For this we already had an other subject in the list archives as well
> > "Compiler warning in omap-twl4030keypad.c".
> >
> > Above Khasim acked it (with misleading subject ;) ) and I also think
> > it's okay
> >
> > http://linux.omap.com/pipermail/linux-omap-open-source/2007-May/010086.html
> >
> > Acked-by: Dirk Behme <dirk.behme@gmail.com>
> >
> > Conclusion: For (1) we have to wait, for (2) please apply.
> >
> > Hope that helps a little,
>
> Yeah, it's getting complex :) Pushing Felipe's patch posted by Nishant
> today.
Correction Felipe's patch posted by Khasim :)
Tony
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-06-05 10:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-25 23:04 [PATCH 1/2] OMAP: Kill compile warnings nishanth menon
2007-05-25 23:12 ` Tony Lindgren
2007-05-25 23:17 ` Syed Mohammed, Khasim
2007-05-25 23:23 ` nishanth menon
2007-05-25 23:25 ` Syed Mohammed, Khasim
2007-05-26 5:38 ` Dirk Behme
2007-06-05 10:11 ` Tony Lindgren
2007-06-05 10:21 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox