Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: omap: fix missing declaration warnings

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>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+17 -14
+1 -1
arch/arm/mach-omap1/fb.c
··· 30 30 31 31 static u64 omap_fb_dma_mask = ~(u32)0; 32 32 33 - struct resource omap_fb_resources[] = { 33 + static struct resource omap_fb_resources[] = { 34 34 { 35 35 .name = "irq", 36 36 .start = INT_LCD_CTRL,
+1
arch/arm/mach-omap1/i2c.c
··· 10 10 11 11 #include "mux.h" 12 12 #include "soc.h" 13 + #include "i2c.h" 13 14 14 15 #define OMAP_I2C_SIZE 0x3f 15 16 #define OMAP1_I2C_BASE 0xfffb3800
+1 -1
arch/arm/mach-omap1/timer32k.c
··· 212 212 * Returns 0 upon success or negative error code upon failure. 213 213 * 214 214 */ 215 - int __init omap_init_clocksource_32k(void __iomem *vbase) 215 + static int __init omap_init_clocksource_32k(void __iomem *vbase) 216 216 { 217 217 int ret; 218 218
+12 -1
arch/arm/mach-omap2/common.h
··· 266 266 extern void __iomem *omap4_get_sar_ram_base(void); 267 267 extern void omap4_mpuss_early_init(void); 268 268 extern void omap_do_wfi(void); 269 - 269 + extern void omap_interconnect_sync(void); 270 270 271 271 #ifdef CONFIG_SMP 272 272 /* Needed for secondary core boot */ ··· 359 359 360 360 /* SoC specific clock initializer */ 361 361 int omap_clk_init(void); 362 + 363 + #if IS_ENABLED(CONFIG_OMAP_IOMMU) 364 + int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request, 365 + u8 *pwrst); 366 + #else 367 + static inline int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, 368 + bool request, u8 *pwrst) 369 + { 370 + return 0; 371 + } 372 + #endif 362 373 363 374 #endif /* __ASSEMBLER__ */ 364 375 #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
+1
arch/arm/mach-omap2/dma.c
··· 30 30 #include <linux/omap-dma.h> 31 31 32 32 #include "soc.h" 33 + #include "common.h" 33 34 34 35 static const struct omap_dma_reg reg_map[] = { 35 36 [REVISION] = { 0x0000, 0x00, OMAP_DMA_REG_32BIT },
+1
arch/arm/mach-omap2/omap-iommu.c
··· 13 13 14 14 #include "clockdomain.h" 15 15 #include "powerdomain.h" 16 + #include "common.h" 16 17 17 18 struct pwrdm_link { 18 19 struct device *dev;
-11
arch/arm/mach-omap2/pdata-quirks.c
··· 43 43 static struct of_dev_auxdata omap_auxdata_lookup[]; 44 44 static struct twl4030_gpio_platform_data twl_gpio_auxdata; 45 45 46 - #if IS_ENABLED(CONFIG_OMAP_IOMMU) 47 - int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request, 48 - u8 *pwrst); 49 - #else 50 - static inline int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, 51 - bool request, u8 *pwrst) 52 - { 53 - return 0; 54 - } 55 - #endif 56 - 57 46 #ifdef CONFIG_MACH_NOKIA_N8X0 58 47 static void __init omap2420_n8x0_legacy_init(void) 59 48 {