* [PATCH 1/3] ARM: OMAP: 32k counter: resolve sparse warnings
2012-12-24 1:24 [PATCH 0/3] ARM: OMAP: resolve sparse warnings with v3.8-rc1 Paul Walmsley
@ 2012-12-24 1:24 ` Paul Walmsley
2012-12-25 16:22 ` Santosh Shilimkar
2013-01-01 18:13 ` Tony Lindgren
2012-12-24 1:25 ` [PATCH 2/3] ARM: OMAP AM33xx: hwmod data: " Paul Walmsley
2012-12-24 1:25 ` [PATCH 3/3] ARM: OMAP: SRAM: " Paul Walmsley
2 siblings, 2 replies; 10+ messages in thread
From: Paul Walmsley @ 2012-12-24 1:24 UTC (permalink / raw)
To: linux-arm-kernel
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.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
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
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c
index f3771cd..1d129d3 100644
--- a/arch/arm/plat-omap/counter_32k.c
+++ b/arch/arm/plat-omap/counter_32k.c
@@ -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)
diff --git a/arch/arm/plat-omap/counter_32k.h b/arch/arm/plat-omap/counter_32k.h
new file mode 100644
index 0000000..4366ce5
--- /dev/null
+++ b/arch/arm/plat-omap/counter_32k.h
@@ -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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 1/3] ARM: OMAP: 32k counter: resolve sparse warnings
2012-12-24 1:24 ` [PATCH 1/3] ARM: OMAP: 32k counter: resolve sparse warnings Paul Walmsley
@ 2012-12-25 16:22 ` Santosh Shilimkar
2013-01-01 18:13 ` Tony Lindgren
1 sibling, 0 replies; 10+ messages in thread
From: Santosh Shilimkar @ 2012-12-25 16:22 UTC (permalink / raw)
To: linux-arm-kernel
On Monday 24 December 2012 06:54 AM, Paul Walmsley wrote:
> 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.
>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Looks good to my eyes.
Acked-by : Santosh Shilimkar <santosh.shilimkar@ti.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/3] ARM: OMAP: 32k counter: resolve sparse warnings
2012-12-24 1:24 ` [PATCH 1/3] ARM: OMAP: 32k counter: resolve sparse warnings Paul Walmsley
2012-12-25 16:22 ` Santosh Shilimkar
@ 2013-01-01 18:13 ` Tony Lindgren
2013-01-02 19:36 ` Paul Walmsley
1 sibling, 1 reply; 10+ messages in thread
From: Tony Lindgren @ 2013-01-01 18:13 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Sorry for the delay, just noticed this looking at your pull request.
* Paul Walmsley <paul@pwsan.com> [121223 17:30]:
> 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.
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/3] ARM: OMAP: 32k counter: resolve sparse warnings
2013-01-01 18:13 ` Tony Lindgren
@ 2013-01-02 19:36 ` Paul Walmsley
0 siblings, 0 replies; 10+ messages in thread
From: Paul Walmsley @ 2013-01-02 19:36 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tue, 1 Jan 2013, Tony Lindgren wrote:
> 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 <paul@pwsan.com>
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.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/counter_32k.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c
index f3771cd..5b0b86b 100644
--- a/arch/arm/plat-omap/counter_32k.c
+++ b/arch/arm/plat-omap/counter_32k.c
@@ -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)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] ARM: OMAP AM33xx: hwmod data: resolve sparse warnings
2012-12-24 1:24 [PATCH 0/3] ARM: OMAP: resolve sparse warnings with v3.8-rc1 Paul Walmsley
2012-12-24 1:24 ` [PATCH 1/3] ARM: OMAP: 32k counter: resolve sparse warnings Paul Walmsley
@ 2012-12-24 1:25 ` Paul Walmsley
2012-12-26 4:10 ` Mugunthan V N
2012-12-24 1:25 ` [PATCH 3/3] ARM: OMAP: SRAM: " Paul Walmsley
2 siblings, 1 reply; 10+ messages in thread
From: Paul Walmsley @ 2012-12-24 1:25 UTC (permalink / raw)
To: linux-arm-kernel
Commit 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.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Cc: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
---
arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index 081c71e..02ca493 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -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,
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] ARM: OMAP AM33xx: hwmod data: resolve sparse warnings
2012-12-24 1:25 ` [PATCH 2/3] ARM: OMAP AM33xx: hwmod data: " Paul Walmsley
@ 2012-12-26 4:10 ` Mugunthan V N
0 siblings, 0 replies; 10+ messages in thread
From: Mugunthan V N @ 2012-12-26 4:10 UTC (permalink / raw)
To: linux-arm-kernel
On 12/24/2012 6:55 AM, Paul Walmsley wrote:
> Commit 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.
>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> Cc: Mugunthan V N <mugunthanvnm@ti.com>
> Cc: Vaibhav Hiremath <hvaibhav@ti.com>
> Cc: Peter Korsgaard <jacmet@sunsite.dk>
> Cc: Richard Cochran <richardcochran@gmail.com>
> Cc: David S. Miller <davem@davemloft.net>
>
Looks good to me.
Acked-by : Mugunthan V N <mugunthanvnm@ti.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 3/3] ARM: OMAP: SRAM: resolve sparse warnings
2012-12-24 1:24 [PATCH 0/3] ARM: OMAP: resolve sparse warnings with v3.8-rc1 Paul Walmsley
2012-12-24 1:24 ` [PATCH 1/3] ARM: OMAP: 32k counter: resolve sparse warnings Paul Walmsley
2012-12-24 1:25 ` [PATCH 2/3] ARM: OMAP AM33xx: hwmod data: " Paul Walmsley
@ 2012-12-24 1:25 ` Paul Walmsley
2013-01-01 18:15 ` Tony Lindgren
2 siblings, 1 reply; 10+ messages in thread
From: Paul Walmsley @ 2012-12-24 1:25 UTC (permalink / raw)
To: linux-arm-kernel
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?
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.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
---
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
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 743fc28..d15e7b9 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -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;
diff --git a/arch/arm/plat-omap/sram.h b/arch/arm/plat-omap/sram.h
new file mode 100644
index 0000000..7e47de4
--- /dev/null
+++ b/arch/arm/plat-omap/sram.h
@@ -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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] ARM: OMAP: SRAM: resolve sparse warnings
2012-12-24 1:25 ` [PATCH 3/3] ARM: OMAP: SRAM: " Paul Walmsley
@ 2013-01-01 18:15 ` Tony Lindgren
2013-01-02 19:37 ` Paul Walmsley
0 siblings, 1 reply; 10+ messages in thread
From: Tony Lindgren @ 2013-01-01 18:15 UTC (permalink / raw)
To: linux-arm-kernel
* Paul Walmsley <paul@pwsan.com> [121223 17:30]:
> 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?
>
> 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.
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 3/3] ARM: OMAP: SRAM: resolve sparse warnings
2013-01-01 18:15 ` Tony Lindgren
@ 2013-01-02 19:37 ` Paul Walmsley
0 siblings, 0 replies; 10+ messages in thread
From: Paul Walmsley @ 2013-01-02 19:37 UTC (permalink / raw)
To: linux-arm-kernel
Hi
On Tue, 1 Jan 2013, Tony Lindgren wrote:
> 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 <paul@pwsan.com>
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.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/sram.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 743fc28..a5bc92d 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -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;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread