Skip to content

Commit

Permalink
OMAP: plat-omap: Fix static function warnings
Browse files Browse the repository at this point in the history
This patch fixes sparse warnings due non declarations of static functions.

arch/arm/plat-omap/sram.c:130:13: warning: symbol 'omap_detect_sram' was not declared. Should it be static?
arch/arm/plat-omap/sram.c:216:13: warning: symbol 'omap_map_sram' was not declared. Should it be static?
arch/arm/plat-omap/sram.c:450:12: warning: symbol 'omap_sram_init' was not declared. Should it be static?
arch/arm/plat-omap/sram.c:348:12: warning: symbol 'omap242x_sram_init' was not declared. Should it be static?
arch/arm/plat-omap/sram.c:369:12: warning: symbol 'omap243x_sram_init' was not declared. Should it be static?
arch/arm/plat-omap/sram.c:425:12: warning: symbol 'omap34xx_sram_init' was not declared. Should it be static?
arch/arm/plat-omap/sram.c:441:12: warning: symbol 'omap44xx_sram_init' was not declared. Should it be static

arch/arm/plat-omap/mcbsp.c:36:6: warning: symbol 'omap_mcbsp_write' was not declared. Should it be static?
arch/arm/plat-omap/mcbsp.c:50:5: warning: symbol 'omap_mcbsp_read' was not declared. Should it be static?
arch/arm/plat-omap/mcbsp.c:65:6: warning: symbol 'omap_mcbsp_st_write' was not declared. Should it be static?
arch/arm/plat-omap/mcbsp.c:70:5: warning: symbol 'omap_mcbsp_st_read' was not declared. Should it be static?
arch/arm/plat-omap/mcbsp.c:1648:15: warning: symbol 'omap_st_add' was not declared. Should it be static?

arch/arm/plat-omap/fb.c:414:15: warning: symbol 'omapfb_reserve_sram' was not declared. Should it be static?
arch/arm/plat-omap/cpu-omap.c:43:5: warning: symbol 'omap_verify_speed' was not declared. Should it be static?
arch/arm/plat-omap/cpu-omap.c:61:14: warning: symbol 'omap_getspeed' was not declared. Should it be static?

Signed-off-by: Manjunath Kondaiah G <manjugk@ti.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Manjunath Kondaiah G authored and Tony Lindgren committed Oct 8, 2010
1 parent 600ecd9 commit b0a330d
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 20 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-omap2/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "clock2xxx.h"
#include "clock3xxx.h"
#include "clock44xx.h"
#include "io.h"

#include <plat/omap-pm.h>
#include <plat/powerdomain.h>
Expand Down
7 changes: 7 additions & 0 deletions arch/arm/mach-omap2/io.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

#ifndef __MACH_OMAP2_IO_H__
#define __MACH_OMAP2_IO_H__

extern int __init omap_sram_init(void);

#endif /* __MACH_OMAP2_IO_H__ */
4 changes: 2 additions & 2 deletions arch/arm/plat-omap/cpu-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static struct clk *mpu_clk;

/* TODO: Add support for SDRAM timing changes */

int omap_verify_speed(struct cpufreq_policy *policy)
static int omap_verify_speed(struct cpufreq_policy *policy)
{
if (freq_table)
return cpufreq_frequency_table_verify(policy, freq_table);
Expand All @@ -58,7 +58,7 @@ int omap_verify_speed(struct cpufreq_policy *policy)
return 0;
}

unsigned int omap_getspeed(unsigned int cpu)
static unsigned int omap_getspeed(unsigned int cpu)
{
unsigned long rate;

Expand Down
2 changes: 2 additions & 0 deletions arch/arm/plat-omap/fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#include <plat/board.h>
#include <plat/sram.h>

#include "fb.h"

#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)

static struct omapfb_platform_data omapfb_config;
Expand Down
10 changes: 10 additions & 0 deletions arch/arm/plat-omap/fb.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef __PLAT_OMAP_FB_H__
#define __PLAT_OMAP_FB_H__

extern unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
unsigned long sram_vstart,
unsigned long sram_size,
unsigned long pstart_avail,
unsigned long size_avail);

#endif /* __PLAT_OMAP_FB_H__ */
1 change: 0 additions & 1 deletion arch/arm/plat-omap/include/plat/sram.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#ifndef __ARCH_ARM_OMAP_SRAM_H
#define __ARCH_ARM_OMAP_SRAM_H

extern int __init omap_sram_init(void);
extern void * omap_sram_push(void * start, unsigned long size);
extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl);

Expand Down
10 changes: 5 additions & 5 deletions arch/arm/plat-omap/mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
struct omap_mcbsp **mcbsp_ptr;
int omap_mcbsp_count, omap_mcbsp_cache_size;

void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val)
static void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val)
{
if (cpu_class_is_omap1()) {
((u16 *)mcbsp->reg_cache)[reg / sizeof(u16)] = (u16)val;
Expand All @@ -47,7 +47,7 @@ void omap_mcbsp_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val)
}
}

int omap_mcbsp_read(struct omap_mcbsp *mcbsp, u16 reg, bool from_cache)
static int omap_mcbsp_read(struct omap_mcbsp *mcbsp, u16 reg, bool from_cache)
{
if (cpu_class_is_omap1()) {
return !from_cache ? __raw_readw(mcbsp->io_base + reg) :
Expand All @@ -62,12 +62,12 @@ int omap_mcbsp_read(struct omap_mcbsp *mcbsp, u16 reg, bool from_cache)
}

#ifdef CONFIG_ARCH_OMAP3
void omap_mcbsp_st_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val)
static void omap_mcbsp_st_write(struct omap_mcbsp *mcbsp, u16 reg, u32 val)
{
__raw_writel(val, mcbsp->st_data->io_base_st + reg);
}

int omap_mcbsp_st_read(struct omap_mcbsp *mcbsp, u16 reg)
static int omap_mcbsp_st_read(struct omap_mcbsp *mcbsp, u16 reg)
{
return __raw_readl(mcbsp->st_data->io_base_st + reg);
}
Expand Down Expand Up @@ -1648,7 +1648,7 @@ static const struct attribute_group sidetone_attr_group = {
.attrs = (struct attribute **)sidetone_attrs,
};

int __devinit omap_st_add(struct omap_mcbsp *mcbsp)
static int __devinit omap_st_add(struct omap_mcbsp *mcbsp)
{
struct omap_mcbsp_platform_data *pdata = mcbsp->pdata;
struct omap_mcbsp_st_data *st_data;
Expand Down
21 changes: 9 additions & 12 deletions arch/arm/plat-omap/sram.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/omapfb.h>

#include <asm/tlb.h>
#include <asm/cacheflush.h>
Expand All @@ -31,6 +32,8 @@
#include <plat/vram.h>

#include <plat/control.h>
#include "sram.h"
#include "fb.h"

#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
# include "../mach-omap2/prm.h"
Expand Down Expand Up @@ -79,12 +82,6 @@ static unsigned long omap_sram_base;
static unsigned long omap_sram_size;
static unsigned long omap_sram_ceil;

extern unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
unsigned long sram_vstart,
unsigned long sram_size,
unsigned long pstart_avail,
unsigned long size_avail);

/*
* Depending on the target RAMFS firewall setup, the public usable amount of
* SRAM varies. The default accessible size for all device types is 2k. A GP
Expand Down Expand Up @@ -118,7 +115,7 @@ static int is_sram_locked(void)
* to secure SRAM will hang the system. Also the SRAM is not
* yet mapped at this point.
*/
void __init omap_detect_sram(void)
static void __init omap_detect_sram(void)
{
unsigned long reserved;

Expand Down Expand Up @@ -204,7 +201,7 @@ static struct map_desc omap_sram_io_desc[] __initdata = {
/*
* Note that we cannot use ioremap for SRAM, as clock init needs SRAM early.
*/
void __init omap_map_sram(void)
static void __init omap_map_sram(void)
{
unsigned long base;

Expand Down Expand Up @@ -336,7 +333,7 @@ u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass)
#endif

#ifdef CONFIG_ARCH_OMAP2420
int __init omap242x_sram_init(void)
static int __init omap242x_sram_init(void)
{
_omap2_sram_ddr_init = omap_sram_push(omap242x_sram_ddr_init,
omap242x_sram_ddr_init_sz);
Expand All @@ -357,7 +354,7 @@ static inline int omap242x_sram_init(void)
#endif

#ifdef CONFIG_ARCH_OMAP2430
int __init omap243x_sram_init(void)
static int __init omap243x_sram_init(void)
{
_omap2_sram_ddr_init = omap_sram_push(omap243x_sram_ddr_init,
omap243x_sram_ddr_init_sz);
Expand Down Expand Up @@ -413,7 +410,7 @@ void omap3_sram_restore_context(void)
}
#endif /* CONFIG_PM */

int __init omap34xx_sram_init(void)
static int __init omap34xx_sram_init(void)
{
_omap3_sram_configure_core_dpll =
omap_sram_push(omap3_sram_configure_core_dpll,
Expand All @@ -429,7 +426,7 @@ static inline int omap34xx_sram_init(void)
#endif

#ifdef CONFIG_ARCH_OMAP4
int __init omap44xx_sram_init(void)
static int __init omap44xx_sram_init(void)
{
printk(KERN_ERR "FIXME: %s not implemented\n", __func__);

Expand Down
6 changes: 6 additions & 0 deletions arch/arm/plat-omap/sram.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __PLAT_OMAP_SRAM_H__
#define __PLAT_OMAP_SRAM_H__

extern int __init omap_sram_init(void);

#endif /* __PLAT_OMAP_SRAM_H__ */

0 comments on commit b0a330d

Please sign in to comment.