Skip to content

Commit e514f1f

Browse files
committed
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 <[email protected]> Reviewed-by: Tony Lindgren <[email protected]> Tested-by: Tony Lindgren <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent deb4471 commit e514f1f

File tree

7 files changed

+17
-14
lines changed

7 files changed

+17
-14
lines changed

arch/arm/mach-omap1/fb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static struct omapfb_platform_data omapfb_config;
3030

3131
static u64 omap_fb_dma_mask = ~(u32)0;
3232

33-
struct resource omap_fb_resources[] = {
33+
static struct resource omap_fb_resources[] = {
3434
{
3535
.name = "irq",
3636
.start = INT_LCD_CTRL,

arch/arm/mach-omap1/i2c.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include "mux.h"
1212
#include "soc.h"
13+
#include "i2c.h"
1314

1415
#define OMAP_I2C_SIZE 0x3f
1516
#define OMAP1_I2C_BASE 0xfffb3800

arch/arm/mach-omap1/timer32k.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static void omap_read_persistent_clock64(struct timespec64 *ts)
212212
* Returns 0 upon success or negative error code upon failure.
213213
*
214214
*/
215-
int __init omap_init_clocksource_32k(void __iomem *vbase)
215+
static int __init omap_init_clocksource_32k(void __iomem *vbase)
216216
{
217217
int ret;
218218

arch/arm/mach-omap2/common.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ extern void omap4_sar_ram_init(void);
266266
extern void __iomem *omap4_get_sar_ram_base(void);
267267
extern void omap4_mpuss_early_init(void);
268268
extern void omap_do_wfi(void);
269-
269+
extern void omap_interconnect_sync(void);
270270

271271
#ifdef CONFIG_SMP
272272
/* Needed for secondary core boot */
@@ -360,5 +360,16 @@ extern int omap_dss_reset(struct omap_hwmod *);
360360
/* SoC specific clock initializer */
361361
int omap_clk_init(void);
362362

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
373+
363374
#endif /* __ASSEMBLER__ */
364375
#endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */

arch/arm/mach-omap2/dma.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <linux/omap-dma.h>
3131

3232
#include "soc.h"
33+
#include "common.h"
3334

3435
static const struct omap_dma_reg reg_map[] = {
3536
[REVISION] = { 0x0000, 0x00, OMAP_DMA_REG_32BIT },

arch/arm/mach-omap2/omap-iommu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include "clockdomain.h"
1515
#include "powerdomain.h"
16+
#include "common.h"
1617

1718
struct pwrdm_link {
1819
struct device *dev;

arch/arm/mach-omap2/pdata-quirks.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,6 @@ struct pdata_init {
4343
static struct of_dev_auxdata omap_auxdata_lookup[];
4444
static struct twl4030_gpio_platform_data twl_gpio_auxdata;
4545

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-
5746
#ifdef CONFIG_MACH_NOKIA_N8X0
5847
static void __init omap2420_n8x0_legacy_init(void)
5948
{

0 commit comments

Comments
 (0)