linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: tony@atomide.com, jmkrzyszt@gmail.com, aaro.koskinen@iki.fi,
	vireshk@kernel.org, shiraz.linux.kernel@gmail.com,
	nsekhar@ti.com, brgl@bgdev.pl, linux-kernel@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>, kernel test robot <lkp@intel.com>
Subject: [PATCH 5/6] ARM: omap2: fix missing declaration warnings
Date: Thu, 28 Apr 2022 15:31:57 +0200	[thread overview]
Message-ID: <20220428133210.990808-6-arnd@kernel.org> (raw)
In-Reply-To: <20220428133210.990808-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

Moving the plat-omap files triggered a sparse warning for omap1 and
omap2 that is now in a different file from before. Found some more sparse
warnings here that I address by making sure the declaration is visible
to both the caller and the callee, or they are static

mach-omap1/fb.c:33:17: warning: symbol 'omap_fb_resources' was not declared. Should it be static?
mach-omap1/timer32k.c:215:12: warning: symbol 'omap_init_clocksource_32k' was not declared. Should it be static?
mach-omap1/i2c.c:36:12: warning: symbol 'omap_i2c_add_bus' was not declared. Should it be static?
mach-omap1/i2c.c:115:12: warning: symbol 'omap_register_i2c_bus_cmdline' was not declared. Should it be static?
mach-omap1/i2c.c:140:12: warning: symbol 'omap_register_i2c_bus' was not declared. Should it be static?
mach-omap2/dma.c:180:34: warning: symbol 'dma_plat_info' was not declared. Should it be static?
mach-omap2/omap4-common.c:116:6: warning: symbol 'omap_interconnect_sync' was not declared. Should it be static?
mach-omap2/omap-iommu.c:113:5: warning: symbol 'omap_iommu_set_pwrdm_constraint' was not declared. Should it be static?

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-omap1/fb.c           |  2 +-
 arch/arm/mach-omap1/i2c.c          |  1 +
 arch/arm/mach-omap1/timer32k.c     |  2 +-
 arch/arm/mach-omap2/common.h       | 13 ++++++++++++-
 arch/arm/mach-omap2/dma.c          |  1 +
 arch/arm/mach-omap2/omap-iommu.c   |  1 +
 arch/arm/mach-omap2/pdata-quirks.c | 11 -----------
 7 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-omap1/fb.c b/arch/arm/mach-omap1/fb.c
index a4538c231f66..b6e952b03838 100644
--- a/arch/arm/mach-omap1/fb.c
+++ b/arch/arm/mach-omap1/fb.c
@@ -30,7 +30,7 @@ static struct omapfb_platform_data omapfb_config;
 
 static u64 omap_fb_dma_mask = ~(u32)0;
 
-struct resource omap_fb_resources[] = {
+static struct resource omap_fb_resources[] = {
 	{
 		.name  = "irq",
 		.start = INT_LCD_CTRL,
diff --git a/arch/arm/mach-omap1/i2c.c b/arch/arm/mach-omap1/i2c.c
index f574eb0bcc0b..22f945360599 100644
--- a/arch/arm/mach-omap1/i2c.c
+++ b/arch/arm/mach-omap1/i2c.c
@@ -10,6 +10,7 @@
 
 #include "mux.h"
 #include "soc.h"
+#include "i2c.h"
 
 #define OMAP_I2C_SIZE		0x3f
 #define OMAP1_I2C_BASE		0xfffb3800
diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c
index 560cd16568a7..410d17d1d443 100644
--- a/arch/arm/mach-omap1/timer32k.c
+++ b/arch/arm/mach-omap1/timer32k.c
@@ -212,7 +212,7 @@ static void omap_read_persistent_clock64(struct timespec64 *ts)
  * Returns 0 upon success or negative error code upon failure.
  *
  */
-int __init omap_init_clocksource_32k(void __iomem *vbase)
+static int __init omap_init_clocksource_32k(void __iomem *vbase)
 {
 	int ret;
 
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 32f58f58515e..bd5981945239 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -266,7 +266,7 @@ extern void omap4_sar_ram_init(void);
 extern void __iomem *omap4_get_sar_ram_base(void);
 extern void omap4_mpuss_early_init(void);
 extern void omap_do_wfi(void);
-
+extern void omap_interconnect_sync(void);
 
 #ifdef CONFIG_SMP
 /* Needed for secondary core boot */
@@ -360,5 +360,16 @@ extern int omap_dss_reset(struct omap_hwmod *);
 /* SoC specific clock initializer */
 int omap_clk_init(void);
 
+#if IS_ENABLED(CONFIG_OMAP_IOMMU)
+int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request,
+				    u8 *pwrst);
+#else
+static inline int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev,
+						  bool request, u8 *pwrst)
+{
+	return 0;
+}
+#endif
+
 #endif /* __ASSEMBLER__ */
 #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
index dfc9b21ff19b..830cd4e7eb44 100644
--- a/arch/arm/mach-omap2/dma.c
+++ b/arch/arm/mach-omap2/dma.c
@@ -30,6 +30,7 @@
 #include <linux/omap-dma.h>
 
 #include "soc.h"
+#include "common.h"
 
 static const struct omap_dma_reg reg_map[] = {
 	[REVISION]	= { 0x0000, 0x00, OMAP_DMA_REG_32BIT },
diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c
index 93c20bbd7b7e..9c8a85198e16 100644
--- a/arch/arm/mach-omap2/omap-iommu.c
+++ b/arch/arm/mach-omap2/omap-iommu.c
@@ -13,6 +13,7 @@
 
 #include "clockdomain.h"
 #include "powerdomain.h"
+#include "common.h"
 
 struct pwrdm_link {
 	struct device *dev;
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index e7fd29a502a0..13f1b89f74b8 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -43,17 +43,6 @@ struct pdata_init {
 static struct of_dev_auxdata omap_auxdata_lookup[];
 static struct twl4030_gpio_platform_data twl_gpio_auxdata;
 
-#if IS_ENABLED(CONFIG_OMAP_IOMMU)
-int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request,
-				    u8 *pwrst);
-#else
-static inline int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev,
-						  bool request, u8 *pwrst)
-{
-	return 0;
-}
-#endif
-
 #ifdef CONFIG_MACH_NOKIA_N8X0
 static void __init omap2420_n8x0_legacy_init(void)
 {
-- 
2.29.2


  parent reply	other threads:[~2022-04-28 13:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 13:31 [PATCH 0/6] ARM: omap/davinci/spear fixes for multiplatform Arnd Bergmann
2022-04-28 13:31 ` [PATCH 1/6] ARM: omap2: remove include/mach/ subdirectory Arnd Bergmann
2022-04-29  5:33   ` Tony Lindgren
2022-04-28 13:31 ` [PATCH 2/6] ARM: davinci: " Arnd Bergmann
2022-05-02 12:03   ` Bartosz Golaszewski
2022-04-28 13:31 ` [PATCH 3/6] ARM: spear: " Arnd Bergmann
2022-04-29  3:14   ` Viresh Kumar
2022-04-28 13:31 ` [PATCH 4/6] ARM: omap: fix address space warnings from sparse Arnd Bergmann
2022-04-29  5:27   ` Tony Lindgren
2022-04-28 13:31 ` Arnd Bergmann [this message]
2022-04-29  5:32   ` [PATCH 5/6] ARM: omap2: fix missing declaration warnings Tony Lindgren
2022-04-28 13:31 ` [PATCH 6/6] ARM: omap1: add back omap_set_dma_priority() stub Arnd Bergmann
2022-04-29  5:32   ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220428133210.990808-6-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=aaro.koskinen@iki.fi \
    --cc=arnd@arndb.de \
    --cc=brgl@bgdev.pl \
    --cc=jmkrzyszt@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=nsekhar@ti.com \
    --cc=shiraz.linux.kernel@gmail.com \
    --cc=tony@atomide.com \
    --cc=vireshk@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).