* [PATCH] ARM: OMAP2: twl-common: fix compiler warnings
@ 2012-06-28 10:49 ` Tero Kristo
0 siblings, 0 replies; 10+ messages in thread
From: Tero Kristo @ 2012-06-28 10:49 UTC (permalink / raw)
To: linux-omap; +Cc: linux-arm-kernel, paul
OMAP2 does not use the external voltage controller code for TWL, and
thus OMAP2 only compilation generates following warnings:
arch/arm/mach-omap2/twl-common.c:51: warning: 'twl_set_voltage' defined but not used
arch/arm/mach-omap2/twl-common.c:57: warning: 'twl_get_voltage' defined but not used
This patch moves the code in question behind ARCH specific flags and
eliminates these warnings.
Reported-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
arch/arm/mach-omap2/twl-common.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index 119d5a9..5447c13 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -48,6 +48,7 @@ static struct i2c_board_info __initdata omap4_i2c1_board_info[] = {
},
};
+#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
static int twl_set_voltage(void *data, int target_uV)
{
struct voltagedomain *voltdm = (struct voltagedomain *)data;
@@ -59,6 +60,7 @@ static int twl_get_voltage(void *data)
struct voltagedomain *voltdm = (struct voltagedomain *)data;
return voltdm_get_voltage(voltdm);
}
+#endif
void __init omap_pmic_init(int bus, u32 clkrate,
const char *pmic_type, int pmic_irq,
--
1.7.4.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] ARM: OMAP2: twl-common: fix compiler warnings
@ 2012-06-28 10:49 ` Tero Kristo
0 siblings, 0 replies; 10+ messages in thread
From: Tero Kristo @ 2012-06-28 10:49 UTC (permalink / raw)
To: linux-arm-kernel
OMAP2 does not use the external voltage controller code for TWL, and
thus OMAP2 only compilation generates following warnings:
arch/arm/mach-omap2/twl-common.c:51: warning: 'twl_set_voltage' defined but not used
arch/arm/mach-omap2/twl-common.c:57: warning: 'twl_get_voltage' defined but not used
This patch moves the code in question behind ARCH specific flags and
eliminates these warnings.
Reported-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
arch/arm/mach-omap2/twl-common.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
index 119d5a9..5447c13 100644
--- a/arch/arm/mach-omap2/twl-common.c
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -48,6 +48,7 @@ static struct i2c_board_info __initdata omap4_i2c1_board_info[] = {
},
};
+#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
static int twl_set_voltage(void *data, int target_uV)
{
struct voltagedomain *voltdm = (struct voltagedomain *)data;
@@ -59,6 +60,7 @@ static int twl_get_voltage(void *data)
struct voltagedomain *voltdm = (struct voltagedomain *)data;
return voltdm_get_voltage(voltdm);
}
+#endif
void __init omap_pmic_init(int bus, u32 clkrate,
const char *pmic_type, int pmic_irq,
--
1.7.4.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] ARM: OMAP2: twl-common: fix compiler warnings
2012-06-28 10:49 ` Tero Kristo
@ 2012-06-29 22:42 ` Paul Walmsley
-1 siblings, 0 replies; 10+ messages in thread
From: Paul Walmsley @ 2012-06-29 22:42 UTC (permalink / raw)
To: Tero Kristo; +Cc: linux-omap, linux-arm-kernel
On Thu, 28 Jun 2012, Tero Kristo wrote:
> OMAP2 does not use the external voltage controller code for TWL, and
> thus OMAP2 only compilation generates following warnings:
>
> arch/arm/mach-omap2/twl-common.c:51: warning: 'twl_set_voltage' defined but not used
> arch/arm/mach-omap2/twl-common.c:57: warning: 'twl_get_voltage' defined but not used
>
> This patch moves the code in question behind ARCH specific flags and
> eliminates these warnings.
>
> Reported-by: Paul Walmsley <paul@pwsan.com>
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
Thanks Tero, looks okay to me. I guess Kevin or Tony should queue this
one.
- Paul
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] ARM: OMAP2: twl-common: fix compiler warnings
@ 2012-06-29 22:42 ` Paul Walmsley
0 siblings, 0 replies; 10+ messages in thread
From: Paul Walmsley @ 2012-06-29 22:42 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, 28 Jun 2012, Tero Kristo wrote:
> OMAP2 does not use the external voltage controller code for TWL, and
> thus OMAP2 only compilation generates following warnings:
>
> arch/arm/mach-omap2/twl-common.c:51: warning: 'twl_set_voltage' defined but not used
> arch/arm/mach-omap2/twl-common.c:57: warning: 'twl_get_voltage' defined but not used
>
> This patch moves the code in question behind ARCH specific flags and
> eliminates these warnings.
>
> Reported-by: Paul Walmsley <paul@pwsan.com>
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
Thanks Tero, looks okay to me. I guess Kevin or Tony should queue this
one.
- Paul
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ARM: OMAP2: twl-common: fix compiler warnings
2012-06-28 10:49 ` Tero Kristo
@ 2012-07-06 8:53 ` Tony Lindgren
-1 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2012-07-06 8:53 UTC (permalink / raw)
To: Tero Kristo; +Cc: linux-omap, linux-arm-kernel, paul
* Tero Kristo <t-kristo@ti.com> [120628 03:54]:
> OMAP2 does not use the external voltage controller code for TWL, and
> thus OMAP2 only compilation generates following warnings:
Hmm well omap2420 does not have twl, but 2430 usually has. So do you
mean that 2430 does not use the external voltage controller code?
> arch/arm/mach-omap2/twl-common.c:51: warning: 'twl_set_voltage' defined but not used
> arch/arm/mach-omap2/twl-common.c:57: warning: 'twl_get_voltage' defined but not used
>
> This patch moves the code in question behind ARCH specific flags and
> eliminates these warnings.
...
> --- a/arch/arm/mach-omap2/twl-common.c
> +++ b/arch/arm/mach-omap2/twl-common.c
> @@ -48,6 +48,7 @@ static struct i2c_board_info __initdata omap4_i2c1_board_info[] = {
> },
> };
>
> +#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
> static int twl_set_voltage(void *data, int target_uV)
> {
> struct voltagedomain *voltdm = (struct voltagedomain *)data;
> @@ -59,6 +60,7 @@ static int twl_get_voltage(void *data)
> struct voltagedomain *voltdm = (struct voltagedomain *)data;
> return voltdm_get_voltage(voltdm);
> }
> +#endif
To avoid patching this piece of code for new SoCs, can we make it
ifndef CONFIG_ARCH_OMAP2? Also in the makefile we should not even
build twl-common.o for 2420 only builds..
Regards,
Tony
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] ARM: OMAP2: twl-common: fix compiler warnings
@ 2012-07-06 8:53 ` Tony Lindgren
0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2012-07-06 8:53 UTC (permalink / raw)
To: linux-arm-kernel
* Tero Kristo <t-kristo@ti.com> [120628 03:54]:
> OMAP2 does not use the external voltage controller code for TWL, and
> thus OMAP2 only compilation generates following warnings:
Hmm well omap2420 does not have twl, but 2430 usually has. So do you
mean that 2430 does not use the external voltage controller code?
> arch/arm/mach-omap2/twl-common.c:51: warning: 'twl_set_voltage' defined but not used
> arch/arm/mach-omap2/twl-common.c:57: warning: 'twl_get_voltage' defined but not used
>
> This patch moves the code in question behind ARCH specific flags and
> eliminates these warnings.
...
> --- a/arch/arm/mach-omap2/twl-common.c
> +++ b/arch/arm/mach-omap2/twl-common.c
> @@ -48,6 +48,7 @@ static struct i2c_board_info __initdata omap4_i2c1_board_info[] = {
> },
> };
>
> +#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
> static int twl_set_voltage(void *data, int target_uV)
> {
> struct voltagedomain *voltdm = (struct voltagedomain *)data;
> @@ -59,6 +60,7 @@ static int twl_get_voltage(void *data)
> struct voltagedomain *voltdm = (struct voltagedomain *)data;
> return voltdm_get_voltage(voltdm);
> }
> +#endif
To avoid patching this piece of code for new SoCs, can we make it
ifndef CONFIG_ARCH_OMAP2? Also in the makefile we should not even
build twl-common.o for 2420 only builds..
Regards,
Tony
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ARM: OMAP2: twl-common: fix compiler warnings
2012-07-06 8:53 ` Tony Lindgren
@ 2012-07-06 10:02 ` Tero Kristo
-1 siblings, 0 replies; 10+ messages in thread
From: Tero Kristo @ 2012-07-06 10:02 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap, linux-arm-kernel, paul
On Fri, 2012-07-06 at 01:53 -0700, Tony Lindgren wrote:
> * Tero Kristo <t-kristo@ti.com> [120628 03:54]:
> > OMAP2 does not use the external voltage controller code for TWL, and
> > thus OMAP2 only compilation generates following warnings:
>
> Hmm well omap2420 does not have twl, but 2430 usually has. So do you
> mean that 2430 does not use the external voltage controller code?
Well, at least currently the external controller code is not used on any
omap2xxx chip. I guess it might be possible to extend the support for
omap2 also, but I don't know who can do that (personally I have no
access to omap2 hw.)
>
> > arch/arm/mach-omap2/twl-common.c:51: warning: 'twl_set_voltage' defined but not used
> > arch/arm/mach-omap2/twl-common.c:57: warning: 'twl_get_voltage' defined but not used
> >
> > This patch moves the code in question behind ARCH specific flags and
> > eliminates these warnings.
> ...
>
> > --- a/arch/arm/mach-omap2/twl-common.c
> > +++ b/arch/arm/mach-omap2/twl-common.c
> > @@ -48,6 +48,7 @@ static struct i2c_board_info __initdata omap4_i2c1_board_info[] = {
> > },
> > };
> >
> > +#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
> > static int twl_set_voltage(void *data, int target_uV)
> > {
> > struct voltagedomain *voltdm = (struct voltagedomain *)data;
> > @@ -59,6 +60,7 @@ static int twl_get_voltage(void *data)
> > struct voltagedomain *voltdm = (struct voltagedomain *)data;
> > return voltdm_get_voltage(voltdm);
> > }
> > +#endif
>
> To avoid patching this piece of code for new SoCs, can we make it
> ifndef CONFIG_ARCH_OMAP2? Also in the makefile we should not even
> build twl-common.o for 2420 only builds..
Can't make it ifndef CONFIG_ARCH_OMAP2, as this would break on
omap2plus_defconfig then... as it defines all ARCH_OMAP2...ARCH_OMAP4.
And... can't drop it from makefile either, as parts of the code from
twl-common.c are still used with omap2 (omap_pmic_init &
omap_pmic_late_init). These would need to be moved elsewhere first.
-Tero
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] ARM: OMAP2: twl-common: fix compiler warnings
@ 2012-07-06 10:02 ` Tero Kristo
0 siblings, 0 replies; 10+ messages in thread
From: Tero Kristo @ 2012-07-06 10:02 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, 2012-07-06 at 01:53 -0700, Tony Lindgren wrote:
> * Tero Kristo <t-kristo@ti.com> [120628 03:54]:
> > OMAP2 does not use the external voltage controller code for TWL, and
> > thus OMAP2 only compilation generates following warnings:
>
> Hmm well omap2420 does not have twl, but 2430 usually has. So do you
> mean that 2430 does not use the external voltage controller code?
Well, at least currently the external controller code is not used on any
omap2xxx chip. I guess it might be possible to extend the support for
omap2 also, but I don't know who can do that (personally I have no
access to omap2 hw.)
>
> > arch/arm/mach-omap2/twl-common.c:51: warning: 'twl_set_voltage' defined but not used
> > arch/arm/mach-omap2/twl-common.c:57: warning: 'twl_get_voltage' defined but not used
> >
> > This patch moves the code in question behind ARCH specific flags and
> > eliminates these warnings.
> ...
>
> > --- a/arch/arm/mach-omap2/twl-common.c
> > +++ b/arch/arm/mach-omap2/twl-common.c
> > @@ -48,6 +48,7 @@ static struct i2c_board_info __initdata omap4_i2c1_board_info[] = {
> > },
> > };
> >
> > +#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
> > static int twl_set_voltage(void *data, int target_uV)
> > {
> > struct voltagedomain *voltdm = (struct voltagedomain *)data;
> > @@ -59,6 +60,7 @@ static int twl_get_voltage(void *data)
> > struct voltagedomain *voltdm = (struct voltagedomain *)data;
> > return voltdm_get_voltage(voltdm);
> > }
> > +#endif
>
> To avoid patching this piece of code for new SoCs, can we make it
> ifndef CONFIG_ARCH_OMAP2? Also in the makefile we should not even
> build twl-common.o for 2420 only builds..
Can't make it ifndef CONFIG_ARCH_OMAP2, as this would break on
omap2plus_defconfig then... as it defines all ARCH_OMAP2...ARCH_OMAP4.
And... can't drop it from makefile either, as parts of the code from
twl-common.c are still used with omap2 (omap_pmic_init &
omap_pmic_late_init). These would need to be moved elsewhere first.
-Tero
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] ARM: OMAP2: twl-common: fix compiler warnings
2012-06-28 10:49 ` Tero Kristo
@ 2012-07-06 10:07 ` Peter Ujfalusi
-1 siblings, 0 replies; 10+ messages in thread
From: Peter Ujfalusi @ 2012-07-06 10:07 UTC (permalink / raw)
To: Tero Kristo; +Cc: linux-omap, linux-arm-kernel, paul
Hi Tero,
On 06/28/2012 12:49 PM, Tero Kristo wrote:
> OMAP2 does not use the external voltage controller code for TWL, and
> thus OMAP2 only compilation generates following warnings:
>
> arch/arm/mach-omap2/twl-common.c:51: warning: 'twl_set_voltage' defined but not used
> arch/arm/mach-omap2/twl-common.c:57: warning: 'twl_get_voltage' defined but not used
>
> This patch moves the code in question behind ARCH specific flags and
> eliminates these warnings.
>
> Reported-by: Paul Walmsley <paul@pwsan.com>
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
I did sent similar patch:
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg70432.html
Tony applied it to fixes I think already.
--
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] ARM: OMAP2: twl-common: fix compiler warnings
@ 2012-07-06 10:07 ` Peter Ujfalusi
0 siblings, 0 replies; 10+ messages in thread
From: Peter Ujfalusi @ 2012-07-06 10:07 UTC (permalink / raw)
To: linux-arm-kernel
Hi Tero,
On 06/28/2012 12:49 PM, Tero Kristo wrote:
> OMAP2 does not use the external voltage controller code for TWL, and
> thus OMAP2 only compilation generates following warnings:
>
> arch/arm/mach-omap2/twl-common.c:51: warning: 'twl_set_voltage' defined but not used
> arch/arm/mach-omap2/twl-common.c:57: warning: 'twl_get_voltage' defined but not used
>
> This patch moves the code in question behind ARCH specific flags and
> eliminates these warnings.
>
> Reported-by: Paul Walmsley <paul@pwsan.com>
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
I did sent similar patch:
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg70432.html
Tony applied it to fixes I think already.
--
P?ter
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-07-06 10:07 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-28 10:49 [PATCH] ARM: OMAP2: twl-common: fix compiler warnings Tero Kristo
2012-06-28 10:49 ` Tero Kristo
2012-06-29 22:42 ` Paul Walmsley
2012-06-29 22:42 ` Paul Walmsley
2012-07-06 8:53 ` Tony Lindgren
2012-07-06 8:53 ` Tony Lindgren
2012-07-06 10:02 ` Tero Kristo
2012-07-06 10:02 ` Tero Kristo
2012-07-06 10:07 ` Peter Ujfalusi
2012-07-06 10:07 ` Peter Ujfalusi
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.