ARM: OMAP: resolve sparse warnings with v3.8-rc1
Subsystems (4)
Paul Walmsley
maintainercover ARM: OMAP: resolve sparse warnings with v3.8-rc1
Another minor release, another new set of sparse warnings. It would be good if patch submitters and mainline committers can verify that new patches don't add sparse warnings. Otherwise it makes it harder for others to verify that their code is sparse-warning-free.
- Paul
---
sparse_fixes_a_3.8-rc
text data bss dec hex filename
7697036 722268 5614832 14034136 d624d8 vmlinux.omap2plus_defconfig.orig
7697036 722268 5614832 14034136 d624d8 vmlinux.omap2plus_defconfig
Paul Walmsley (3):
ARM: OMAP: 32k counter: resolve sparse warnings
ARM: OMAP AM33xx: hwmod data: resolve sparse warnings
ARM: OMAP: SRAM: resolve sparse warnings
arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 4 ++- arch/arm/plat-omap/counter_32k.c | 2 ++ arch/arm/plat-omap/counter_32k.h | 20 ++++++++++++++++ arch/arm/plat-omap/sram.c | 2 ++ arch/arm/plat-omap/sram.h | 35 ++++++++++++++++++++++++++++ 5 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 arch/arm/plat-omap/counter_32k.h create mode 100644 arch/arm/plat-omap/sram.h
Paul Walmsley
maintainerPATCH 1/3 ARM: OMAP: 32k counter: resolve sparse warnings
Commit 1fe97c8f6a1de67a5f56e029a818903d5bed8017 ("ARM: OMAP: Make OMAP clocksource source selection using kernel param") results in a new warning from sparse:
arch/arm/plat-omap/counter_32k.c:86:12: warning: symbol 'omap_init_clocksource_32k' was not declared. Should it be static?
Fix by adding a temporary header file, needed until the 32k counter code is moved to drivers/. arch/arm/plat-omap/include/plat/counter-32k.h can't be added due to ARM CONFIG_ARCH_MULTIPLATFORM restrictions on the use of the "plat/" include path shortcut.
--- arch/arm/plat-omap/counter_32k.c | 2 ++ arch/arm/plat-omap/counter_32k.h | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 arch/arm/plat-omap/counter_32k.h
arch/arm/plat-omap/counter_32k.c +2 -0
@@ -22,6 +22,8 @@#include <asm/mach/time.h> #include <asm/sched_clock.h> +#include "counter_32k.h" +/* OMAP2_32KSYNCNT_CR_OFF: offset of 32ksync counter register */ #define OMAP2_32KSYNCNT_REV_OFF 0x0#define OMAP2_32KSYNCNT_REV_SCHEME (0x3 << 30)
arch/arm/plat-omap/counter_32k.h new file +20 -0
@@ -0,0 +1,20 @@ +/* +* OMAP 32k counter function prototypes +* +* Copyright (C) 2012 Texas Instruments, Inc. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +* +* XXX Needed until the OMAP 32k counter code is moved to somewhere under +* drivers/. +*/ +#ifndef __ARCH_ARM_PLAT_OMAP_COUNTER_32K_H +#define __ARCH_ARM_PLAT_OMAP_COUNTER_32K_H + +#include <linux/kernel.h> + +extern int omap_init_clocksource_32k (void __iomem *vbase); + +#endif
PATCH 1/3 ARM: OMAP: 32k counter: resolve sparse warnings
Quoted 6 lines · Paul Walmsley
Commit
1fe97c8f6a1de67a5f56e029a818903d5bed8017("ARM: OMAP: Make OMAP clocksource source selection using kernel param") results in a new warning from sparse:
arch/arm/plat-omap/counter_32k.c:86:12: warning: symbol 'omap_init_clocksource_32k' was not declared. Should it be static?
Quoted 7 lines
Fix by adding a temporary header file, needed until the 32k counter code is moved to
drivers/.arch/arm/plat-omap/include/plat/counter-32k.hcan't be added due to ARMCONFIG_ARCH_MULTIPLATFORMrestrictions on the use of the "plat/" include path shortcut.Signed-off-by Paul Walmsley <[email protected]>
Looks good to my eyes.
Tony Lindgren
maintainerPATCH 1/3 ARM: OMAP: 32k counter: resolve sparse warnings
In reply to Paul WalmsleyHi,
Sorry for the delay, just noticed this looking at your pull request.
Quoted 11 lines · Paul Walmsley
Commit
1fe97c8f6a1de67a5f56e029a818903d5bed8017("ARM: OMAP: Make OMAP clocksource source selection using kernel param") results in a new warning from sparse:
arch/arm/plat-omap/counter_32k.c:86:12: warning: symbol 'omap_init_clocksource_32k' was not declared. Should it be static?Fix by adding a temporary header file, needed until the 32k counter code is moved to
drivers/.arch/arm/plat-omap/include/plat/counter-32k.hcan't be added due to ARMCONFIG_ARCH_MULTIPLATFORMrestrictions on the use of the "plat/" include path shortcut.
Here it's OK to include <plat/counter-32k.h> for multiplatform builds as the path will be included in plat-omap/Makefile.
So include <plat/*.h> will only disappear for drivers. In the long run we should just make the remaining code in plat-omap into drivers, and then issue will disappear for good. But until these are all drivers, we should just include <plat/counter-32k.h>.
Regards,
Tony
Paul Walmsley
maintainerPATCH 1/3 ARM: OMAP: 32k counter: resolve sparse warnings
Hi,
Quoted 2 lines · Tony Lindgren
Here it's OK to include <
plat/counter-32k.h> for multiplatform builds as the path will be included in plat-omap/Makefile.
Thanks for the clarification; the patch has been updated as follows.
- Paul
From: Paul Walmsley <[email protected]>
Date: Mon, 10 Dec 2012 11:48:44 -0700
Subject: [PATCH] ARM: OMAP: 32k counter: resolve sparse warnings
Commit 1fe97c8f6a1de67a5f56e029a818903d5bed8017 ("ARM: OMAP: Make OMAP clocksource source selection using kernel param") results in a new warning from sparse:
arch/arm/plat-omap/counter_32k.c:86:12: warning: symbol 'omap_init_clocksource_32k' was not declared. Should it be static?
This second version fixes this warning by including <plat/counter-32k.h>, at Tony's request.
--- arch/arm/plat-omap/counter_32k.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/plat-omap/counter_32k.c +2 -0
@@ -22,6 +22,8 @@#include <asm/mach/time.h> #include <asm/sched_clock.h> +#include <plat/counter-32k.h> +/* OMAP2_32KSYNCNT_CR_OFF: offset of 32ksync counter register */ #define OMAP2_32KSYNCNT_REV_OFF 0x0#define OMAP2_32KSYNCNT_REV_SCHEME (0x3 << 30)
Signature · 1 line
1.7.10.4
Paul Walmsley
maintainerPATCH 2/3 ARM: OMAP AM33xx: hwmod data: resolve sparse warnings
In reply to Paul WalmsleyCommit 70384a6af0914d5dcec034643941e29d3e3e69f7 ("ARM: OMAP3+:
hwmod: Add AM33XX HWMOD data for davinci_mdio module") adds two new sparse warnings:
arch/arm/mach-omap2/omap_hwmod_33xx_data.c:2518:30: warning: symbol 'am33xx_mdio_addr_space' was not declared. Should it be static? arch/arm/mach-omap2/omap_hwmod_33xx_data.c:2526:26: warning: symbol 'am33xx_cpgmac0__mdio' was not declared. Should it be static?
Fix by marking the two new records as static.
--- arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +2 -2
@@ -2515,7 +2515,7 @@ static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = { .user = OCP_USER_MPU, }; -struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = { +static struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = { { .pa_start =0x4A101000 , .pa_end =0x4A101000 +SZ_256 -1 ,
@@ -2523,7 +2523,7 @@ struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = { { } }; -struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = { +static struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = { .master = &am33xx_cpgmac0_hwmod, .slave = &am33xx_mdio_hwmod, .addr = am33xx_mdio_addr_space,
PATCH 2/3 ARM: OMAP AM33xx: hwmod data: resolve sparse warnings
Quoted 7 lines · Paul Walmsley
Commit
70384a6af0914d5dcec034643941e29d3e3e69f7("ARM: OMAP3+:
hwmod: Add AM33XX HWMOD data fordavinci_mdiomodule") adds two new sparse warnings:
arch/arm/mach-omap2/omap_hwmod_33xx_data.c:2518:30: warning: symbol 'am33xx_mdio_addr_space' was not declared. Should it be static?arch/arm/mach-omap2/omap_hwmod_33xx_data.c:2526:26: warning: symbol 'am33xx_cpgmac0__mdio' was not declared. Should it be static?
Quoted 9 lines
Fix by marking the two new records as static.
Signed-off-by Paul Walmsley <[email protected]>Cc Mugunthan V N <[email protected]>Cc Vaibhav Hiremath <[email protected]>Cc Peter Korsgaard <[email protected]>Cc Richard Cochran <[email protected]>Cc David S. Miller <[email protected]>
Looks good to me.
Paul Walmsley
maintainerPATCH 3/3 ARM: OMAP: SRAM: resolve sparse warnings
In reply to Paul WalmsleyCommit bb77209432873214a796a70a4539e4ebdf3feb54 ("ARM: OMAP: Move omap2+ specific parts of sram.c to mach-omap2") adds some new sparse warnings:
arch/arm/plat-omap/sram.c:43:6: warning: symbol 'omap_sram_push_address' was not declared. Should it be static? arch/arm/plat-omap/sram.c:65:6: warning: symbol 'omap_sram_reset' was not declared. Should it be static? arch/arm/plat-omap/sram.c:73:13: warning: symbol 'omap_map_sram' was not declared. Should it be static?
Fix by creating a temporary header file containing prototypes for these SRAM functions - needed until the SRAM code is moved to drivers/. arch/arm/plat-omap/include/plat/sram.h can't be added due to ARM CONFIG_ARCH_MULTIPLATFORM restrictions on the use of the "plat/" include path shortcut.
--- arch/arm/plat-omap/sram.c | 2 ++ arch/arm/plat-omap/sram.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 arch/arm/plat-omap/sram.h
arch/arm/plat-omap/sram.c +2 -0
@@ -26,6 +26,8 @@#include <asm/mach/map.h> +#include "sram.h" +#define ROUND_DOWN (value,boundary) ((value) & (~((boundary)-1)))static void __iomem *omap_sram_base;
arch/arm/plat-omap/sram.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* OMAP common SRAM prototypes +* +* Copyright (C) 2012 Texas Instruments, Inc. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* version 2 as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA +* +* +* XXX This file is needed until the SRAM handling is implemented via +* some device driver. +*/ + +#ifndef __ARCH_ARM_PLAT_OMAP_SRAM_H +#define __ARCH_ARM_PLAT_OMAP_SRAM_H + +#include <linux/kernel.h> + +extern void *omap_sram_push_address (unsigned long size); +extern void omap_sram_reset (void ); +extern void __init omap_map_sram (unsigned long start,unsigned long size, +unsigned long skip,int cached); + +#endif
Tony Lindgren
maintainerPATCH 3/3 ARM: OMAP: SRAM: resolve sparse warnings
Quoted 8 lines · Paul Walmsley
Commit
bb77209432873214a796a70a4539e4ebdf3feb54("ARM: OMAP: Move omap2+ specific parts ofsram.cto mach-omap2") adds some new sparse warnings:
arch/arm/plat-omap/sram.c:43:6: warning: symbol 'omap_sram_push_address' was not declared. Should it be static?arch/arm/plat-omap/sram.c:65:6: warning: symbol 'omap_sram_reset' was not declared. Should it be static?arch/arm/plat-omap/sram.c:73:13: warning: symbol 'omap_map_sram' was not declared. Should it be static?
Quoted 5 lines
Fix by creating a temporary header file containing prototypes for these SRAM functions - needed until the SRAM code is moved to
drivers/.arch/arm/plat-omap/include/plat/sram.hcan't be added due to ARMCONFIG_ARCH_MULTIPLATFORMrestrictions on the use of the "plat/" include path shortcut.
Here too we should just include <plat/sram.h>, that's OK for the multiplatform builds. Just drivers will not have it available. Then eventually the issue disappears as this code becomes a regular device driver.
Regards,
Tony
Paul Walmsley
maintainerPATCH 3/3 ARM: OMAP: SRAM: resolve sparse warnings
Hi
Quoted 4 lines · Tony Lindgren
Here too we should just include <
plat/sram.h>, that's OK for the multiplatform builds. Just drivers will not have it available. Then eventually the issue disappears as this code becomes a regular device driver.
Sounds good; the updated patch follows.
- Paul
From: Paul Walmsley <[email protected]>
Date: Fri, 28 Dec 2012 02:09:15 -0700
Subject: [PATCH] ARM: OMAP: SRAM: resolve sparse warnings
Commit bb77209432873214a796a70a4539e4ebdf3feb54 ("ARM: OMAP: Move omap2+ specific parts of sram.c to mach-omap2") adds some new sparse warnings:
arch/arm/plat-omap/sram.c:43:6: warning: symbol 'omap_sram_push_address' was not declared. Should it be static? arch/arm/plat-omap/sram.c:65:6: warning: symbol 'omap_sram_reset' was not declared. Should it be static? arch/arm/plat-omap/sram.c:73:13: warning: symbol 'omap_map_sram' was not declared. Should it be static?
This second version fixes the warnings by including <plat/sram.h>, at Tony's request.
--- arch/arm/plat-omap/sram.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/plat-omap/sram.c +2 -0
@@ -26,6 +26,8 @@#include <asm/mach/map.h> +#include <plat/sram.h> +#define ROUND_DOWN (value,boundary) ((value) & (~((boundary)-1)))static void __iomem *omap_sram_base;
Signature · 1 line
1.7.10.4