* [PATCH 0/2] OMAP: TWL: sparse fixes
@ 2011-01-03 18:58 Nishanth Menon
2011-01-03 18:58 ` [PATCH 1/2] OMAP2+: TWL: make conversion routines static Nishanth Menon
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Nishanth Menon @ 2011-01-03 18:58 UTC (permalink / raw)
To: linux-arm-kernel
Source:
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
branch: omap-for-linus
Doing a rm arch/arm/mach-omap2/*.o;make C=1 arch/arm/mach-omap2/
resulted in the following sparse warnings:
http://pastebin.mozilla.org/907954
This series fixes the twl warnings
Nishanth Menon (2):
OMAP2+: TWL: make conversion routines static
OMAP2+: TWL: include pm header for init protos
arch/arm/mach-omap2/omap_twl.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH 1/2] OMAP2+: TWL: make conversion routines static
2011-01-03 18:58 [PATCH 0/2] OMAP: TWL: sparse fixes Nishanth Menon
@ 2011-01-03 18:58 ` Nishanth Menon
2011-01-03 18:58 ` [PATCH 2/2] OMAP2+: TWL: include pm header for init protos Nishanth Menon
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Nishanth Menon @ 2011-01-03 18:58 UTC (permalink / raw)
To: linux-arm-kernel
The uv_to_vsel, vsel_to_uv functions don't need to be exposed to the
world as they are used as function pointers. make them static.
Fixes sparse warnings:
arch/arm/mach-omap2/omap_twl.c:63:15: warning: symbol 'twl4030_vsel_to_uv' was not declared. Should it be static?
arch/arm/mach-omap2/omap_twl.c:68:4: warning: symbol 'twl4030_uv_to_vsel' was not declared. Should it be static?
arch/arm/mach-omap2/omap_twl.c:73:15: warning: symbol 'twl6030_vsel_to_uv' was not declared. Should it be static?
arch/arm/mach-omap2/omap_twl.c:105:4: warning: symbol 'twl6030_uv_to_vsel' was not declared. Should it be static?
Signed-off-by: Nishanth Menon <nm@ti.com>
---
arch/arm/mach-omap2/omap_twl.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c
index 15f8c6c..65ab4e3 100644
--- a/arch/arm/mach-omap2/omap_twl.c
+++ b/arch/arm/mach-omap2/omap_twl.c
@@ -60,17 +60,17 @@ static u8 smps_offset;
#define REG_SMPS_OFFSET 0xE0
-unsigned long twl4030_vsel_to_uv(const u8 vsel)
+static unsigned long twl4030_vsel_to_uv(const u8 vsel)
{
return (((vsel * 125) + 6000)) * 100;
}
-u8 twl4030_uv_to_vsel(unsigned long uv)
+static u8 twl4030_uv_to_vsel(unsigned long uv)
{
return DIV_ROUND_UP(uv - 600000, 12500);
}
-unsigned long twl6030_vsel_to_uv(const u8 vsel)
+static unsigned long twl6030_vsel_to_uv(const u8 vsel)
{
/*
* In TWL6030 depending on the value of SMPS_OFFSET
@@ -102,7 +102,7 @@ unsigned long twl6030_vsel_to_uv(const u8 vsel)
return ((((vsel - 1) * 125) + 6000)) * 100;
}
-u8 twl6030_uv_to_vsel(unsigned long uv)
+static u8 twl6030_uv_to_vsel(unsigned long uv)
{
/*
* In TWL6030 depending on the value of SMPS_OFFSET
--
1.6.3.3
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 2/2] OMAP2+: TWL: include pm header for init protos
2011-01-03 18:58 [PATCH 0/2] OMAP: TWL: sparse fixes Nishanth Menon
2011-01-03 18:58 ` [PATCH 1/2] OMAP2+: TWL: make conversion routines static Nishanth Menon
@ 2011-01-03 18:58 ` Nishanth Menon
2011-01-03 22:36 ` [PATCH 0/2] OMAP: TWL: sparse fixes Russell King - ARM Linux
2011-01-04 18:00 ` Kevin Hilman
3 siblings, 0 replies; 10+ messages in thread
From: Nishanth Menon @ 2011-01-03 18:58 UTC (permalink / raw)
To: linux-arm-kernel
twl_init functions are declared in pm.h and used in pm.c
pm.h header defining the protos need to be included to
ensure that omap_twl.c has consistent function definition.
This fixes sparse warning:
arch/arm/mach-omap2/omap_twl.c:237:12: warning: symbol 'omap4_twl_init' was not declared. Should it be static?
arch/arm/mach-omap2/omap_twl.c:256:12: warning: symbol 'omap3_twl_init' was not declared. Should it be static?
Signed-off-by: Nishanth Menon <nm@ti.com>
---
arch/arm/mach-omap2/omap_twl.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c
index 65ab4e3..00e1d2b 100644
--- a/arch/arm/mach-omap2/omap_twl.c
+++ b/arch/arm/mach-omap2/omap_twl.c
@@ -20,6 +20,8 @@
#include <plat/voltage.h>
+#include "pm.h"
+
#define OMAP3_SRI2C_SLAVE_ADDR 0x12
#define OMAP3_VDD_MPU_SR_CONTROL_REG 0x00
#define OMAP3_VDD_CORE_SR_CONTROL_REG 0x01
--
1.6.3.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 0/2] OMAP: TWL: sparse fixes
2011-01-03 18:58 [PATCH 0/2] OMAP: TWL: sparse fixes Nishanth Menon
2011-01-03 18:58 ` [PATCH 1/2] OMAP2+: TWL: make conversion routines static Nishanth Menon
2011-01-03 18:58 ` [PATCH 2/2] OMAP2+: TWL: include pm header for init protos Nishanth Menon
@ 2011-01-03 22:36 ` Russell King - ARM Linux
2011-01-03 22:39 ` Nishanth Menon
2011-01-04 18:00 ` Kevin Hilman
3 siblings, 1 reply; 10+ messages in thread
From: Russell King - ARM Linux @ 2011-01-03 22:36 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jan 03, 2011 at 12:58:28PM -0600, Nishanth Menon wrote:
> Source:
> git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
> branch: omap-for-linus
>
> Doing a rm arch/arm/mach-omap2/*.o;make C=1 arch/arm/mach-omap2/
> resulted in the following sparse warnings:
> http://pastebin.mozilla.org/907954
FYI, you may like to try:
make C=2 arch/arm/mach-omap2/
instead of the two-step process:
| Do a kernel make with "make C=1" to run sparse on all the C files that get
| recompiled, or use "make C=2" to run sparse on the files whether they need to
| be recompiled or not. The latter is a fast way to check the whole tree if you
| have already built it.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 0/2] OMAP: TWL: sparse fixes
2011-01-03 22:36 ` [PATCH 0/2] OMAP: TWL: sparse fixes Russell King - ARM Linux
@ 2011-01-03 22:39 ` Nishanth Menon
2011-01-04 20:37 ` Nishanth Menon
0 siblings, 1 reply; 10+ messages in thread
From: Nishanth Menon @ 2011-01-03 22:39 UTC (permalink / raw)
To: linux-arm-kernel
Russell King - ARM Linux had written, on 01/03/2011 04:36 PM, the following:
> On Mon, Jan 03, 2011 at 12:58:28PM -0600, Nishanth Menon wrote:
>> Source:
>> git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
>> branch: omap-for-linus
>>
>> Doing a rm arch/arm/mach-omap2/*.o;make C=1 arch/arm/mach-omap2/
>> resulted in the following sparse warnings:
>> http://pastebin.mozilla.org/907954
>
> FYI, you may like to try:
>
> make C=2 arch/arm/mach-omap2/
>
> instead of the two-step process:
> | Do a kernel make with "make C=1" to run sparse on all the C files that get
> | recompiled, or use "make C=2" to run sparse on the files whether they need to
> | be recompiled or not. The latter is a fast way to check the whole tree if you
> | have already built it.
Gee thanks. /me should update my old bash aliases :D
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 0/2] OMAP: TWL: sparse fixes
2011-01-03 22:39 ` Nishanth Menon
@ 2011-01-04 20:37 ` Nishanth Menon
2011-01-05 0:25 ` Russell King - ARM Linux
0 siblings, 1 reply; 10+ messages in thread
From: Nishanth Menon @ 2011-01-04 20:37 UTC (permalink / raw)
To: linux-arm-kernel
Nishanth Menon had written, on 01/03/2011 04:39 PM, the following:
> Russell King - ARM Linux had written, on 01/03/2011 04:36 PM, the
> following:
>> On Mon, Jan 03, 2011 at 12:58:28PM -0600, Nishanth Menon wrote:
>>> Source:
>>> git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
>>> branch: omap-for-linus
>>>
>>> Doing a rm arch/arm/mach-omap2/*.o;make C=1 arch/arm/mach-omap2/
>>> resulted in the following sparse warnings:
>>> http://pastebin.mozilla.org/907954
>>
>> FYI, you may like to try:
>>
>> make C=2 arch/arm/mach-omap2/
>>
>> instead of the two-step process:
>> | Do a kernel make with "make C=1" to run sparse on all the C files
>> that get
>> | recompiled, or use "make C=2" to run sparse on the files whether
>> they need to
>> | be recompiled or not. The latter is a fast way to check the whole
>> tree if you
>> | have already built it.
> Gee thanks. /me should update my old bash aliases :D
hmm.. minor nit (with codesourcery 2010.09-50 - 4.5.1):
rm arch/arm/mach-omap2/*.o;make C=1 arch/arm/mach-omap2/ 2>Kerr;make C=2
arch/arm/mach-omap2/ 2>Kerr1;diff Kerr Kerr1
[..]
1,4d0
< arch/arm/mach-omap2/mux.c: In function 'omap_mux_get_by_name':
< arch/arm/mach-omap2/mux.c:163:17: warning: 'found_mode' may be used
uninitialized in this function
< arch/arm/mach-omap2/clkt_clksel.c: In function 'omap2_clksel_set_parent':
< arch/arm/mach-omap2/clkt_clksel.c:100:35: warning: 'max_clkr' may be
used uninitialized in this function
Kinda interesting to note that C=2 does'nt list all potential gcc
warnings :( if one wanted a collated list of all warnings, rm .../*.o
helps I guess.
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 0/2] OMAP: TWL: sparse fixes
2011-01-04 20:37 ` Nishanth Menon
@ 2011-01-05 0:25 ` Russell King - ARM Linux
2011-01-05 13:32 ` Nishanth Menon
0 siblings, 1 reply; 10+ messages in thread
From: Russell King - ARM Linux @ 2011-01-05 0:25 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jan 04, 2011 at 02:37:23PM -0600, Nishanth Menon wrote:
> hmm.. minor nit (with codesourcery 2010.09-50 - 4.5.1):
> rm arch/arm/mach-omap2/*.o;make C=1 arch/arm/mach-omap2/ 2>Kerr;make C=2
> arch/arm/mach-omap2/ 2>Kerr1;diff Kerr Kerr1
> [..]
> 1,4d0
> < arch/arm/mach-omap2/mux.c: In function 'omap_mux_get_by_name':
> < arch/arm/mach-omap2/mux.c:163:17: warning: 'found_mode' may be used
> uninitialized in this function
> < arch/arm/mach-omap2/clkt_clksel.c: In function 'omap2_clksel_set_parent':
> < arch/arm/mach-omap2/clkt_clksel.c:100:35: warning: 'max_clkr' may be
> used uninitialized in this function
>
> Kinda interesting to note that C=2 does'nt list all potential gcc
> warnings :( if one wanted a collated list of all warnings, rm .../*.o
> helps I guess.
C=2 only runs sparse - so if you're committing patches to fix sparse
warnings, that's what you should be interested in.
I'd suggest that fixing sparse warnings and GCC warnings in a single
patch is probably not the best thing to do - GCC warnings are less
subjective than sparse warnings.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 0/2] OMAP: TWL: sparse fixes
2011-01-05 0:25 ` Russell King - ARM Linux
@ 2011-01-05 13:32 ` Nishanth Menon
0 siblings, 0 replies; 10+ messages in thread
From: Nishanth Menon @ 2011-01-05 13:32 UTC (permalink / raw)
To: linux-arm-kernel
Russell King - ARM Linux wrote, on 01/04/2011 06:25 PM:
> On Tue, Jan 04, 2011 at 02:37:23PM -0600, Nishanth Menon wrote:
>> hmm.. minor nit (with codesourcery 2010.09-50 - 4.5.1):
>> rm arch/arm/mach-omap2/*.o;make C=1 arch/arm/mach-omap2/ 2>Kerr;make C=2
>> arch/arm/mach-omap2/ 2>Kerr1;diff Kerr Kerr1
>> [..]
>> 1,4d0
>> < arch/arm/mach-omap2/mux.c: In function 'omap_mux_get_by_name':
>> < arch/arm/mach-omap2/mux.c:163:17: warning: 'found_mode' may be used
>> uninitialized in this function
>> < arch/arm/mach-omap2/clkt_clksel.c: In function 'omap2_clksel_set_parent':
>> < arch/arm/mach-omap2/clkt_clksel.c:100:35: warning: 'max_clkr' may be
>> used uninitialized in this function
>>
>> Kinda interesting to note that C=2 does'nt list all potential gcc
>> warnings :( if one wanted a collated list of all warnings, rm .../*.o
>> helps I guess.
>
> C=2 only runs sparse - so if you're committing patches to fix sparse
> warnings, that's what you should be interested in.
>
> I'd suggest that fixing sparse warnings and GCC warnings in a single
> patch is probably not the best thing to do - GCC warnings are less
> subjective than sparse warnings.
I agree.
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 0/2] OMAP: TWL: sparse fixes
2011-01-03 18:58 [PATCH 0/2] OMAP: TWL: sparse fixes Nishanth Menon
` (2 preceding siblings ...)
2011-01-03 22:36 ` [PATCH 0/2] OMAP: TWL: sparse fixes Russell King - ARM Linux
@ 2011-01-04 18:00 ` Kevin Hilman
2011-01-04 22:44 ` Kevin Hilman
3 siblings, 1 reply; 10+ messages in thread
From: Kevin Hilman @ 2011-01-04 18:00 UTC (permalink / raw)
To: linux-arm-kernel
Nishanth Menon <nm@ti.com> writes:
> Source:
> git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
> branch: omap-for-linus
>
> Doing a rm arch/arm/mach-omap2/*.o;make C=1 arch/arm/mach-omap2/
> resulted in the following sparse warnings:
> http://pastebin.mozilla.org/907954
>
> This series fixes the twl warnings
> Nishanth Menon (2):
> OMAP2+: TWL: make conversion routines static
> OMAP2+: TWL: include pm header for init protos
>
> arch/arm/mach-omap2/omap_twl.c | 10 ++++++----
> 1 files changed, 6 insertions(+), 4 deletions(-)
Acked-by: Kevin Hilman <khilman@ti.com>
Tony, these should probably queue for .38 if it's not too late.
Kevin
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH 0/2] OMAP: TWL: sparse fixes
2011-01-04 18:00 ` Kevin Hilman
@ 2011-01-04 22:44 ` Kevin Hilman
0 siblings, 0 replies; 10+ messages in thread
From: Kevin Hilman @ 2011-01-04 22:44 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, 2011-01-04 at 10:00 -0800, Kevin Hilman wrote:
> Nishanth Menon <nm@ti.com> writes:
>
> > Source:
> > git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
> > branch: omap-for-linus
> >
> > Doing a rm arch/arm/mach-omap2/*.o;make C=1 arch/arm/mach-omap2/
> > resulted in the following sparse warnings:
> > http://pastebin.mozilla.org/907954
> >
> > This series fixes the twl warnings
> > Nishanth Menon (2):
> > OMAP2+: TWL: make conversion routines static
> > OMAP2+: TWL: include pm header for init protos
> >
> > arch/arm/mach-omap2/omap_twl.c | 10 ++++++----
> > 1 files changed, 6 insertions(+), 4 deletions(-)
>
> Acked-by: Kevin Hilman <khilman@ti.com>
>
> Tony, these should probably queue for .38 if it's not too late.
On second thought, it's too late for the main 2.6.38 merge window for
these. I'll queue these in my pm-fixes branch for the 2.6.38-rc cycle.
Kevin
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-01-05 13:32 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-03 18:58 [PATCH 0/2] OMAP: TWL: sparse fixes Nishanth Menon
2011-01-03 18:58 ` [PATCH 1/2] OMAP2+: TWL: make conversion routines static Nishanth Menon
2011-01-03 18:58 ` [PATCH 2/2] OMAP2+: TWL: include pm header for init protos Nishanth Menon
2011-01-03 22:36 ` [PATCH 0/2] OMAP: TWL: sparse fixes Russell King - ARM Linux
2011-01-03 22:39 ` Nishanth Menon
2011-01-04 20:37 ` Nishanth Menon
2011-01-05 0:25 ` Russell King - ARM Linux
2011-01-05 13:32 ` Nishanth Menon
2011-01-04 18:00 ` Kevin Hilman
2011-01-04 22:44 ` Kevin Hilman
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).