[GIT PULL] omap2 sparse fixes

G, Manjunath Kondaiah manjugk at ti.com
Mon Sep 27 11:00:42 EDT 2010


Hi Russell,

> -----Original Message-----
> From: Russell King - ARM Linux [mailto:linux at arm.linux.org.uk] 
> Sent: Monday, September 27, 2010 7:38 PM
> To: G, Manjunath Kondaiah
> Cc: Tony Lindgren; linux-omap at vger.kernel.org; 
> linux-arm-kernel at lists.infradead.org
> Subject: Re: [GIT PULL] omap2 sparse fixes
> 
> On Mon, Sep 27, 2010 at 07:11:37PM +0530, G, Manjunath Kondaiah wrote:
> > > Can you please check that? Will not merge for now until we figure 
> > > out what changes with these patches.
> > > 
> > > Then, I also noticed the following exports getting added:
> > > 
> > > +EXPORT_SYMBOL(omap2_gp_clockevent_set_gptimer);
> > > +EXPORT_SYMBOL(omapfb_reserve_sram);
> > > +EXPORT_SYMBOL(omap_sram_init);
> > > 
> > > These should not be exported, they are only intended to be called 
> > > from the low-level platform init code. So exporting them 
> is not the 
> > > right fix for these.
> > 
> > I have declared these API's as extern functions in 
> respective header 
> > files.
> 
> It's hard to tell whether you're justifying having the 
> EXPORT_SYMBOLs there or not from your reply.

I tried following approches in order to fix these warnings:

1. Having these defines in .c files as extern functions.
It will generate checkpatch error if it is declared as 
extern in .c file.

2. Moving/creating header file to source code location.
This will resolve only "omap2_gp_clockevent_set_gptimer" function
since other functions are used in source files in different directories.

Only option came to my mind is, having it in header file either 
in plat or mach headers. As you said, even though it is not explicitely
declared as "EXPORT", the functions are available for all other files.

-Manjunath



More information about the linux-arm-kernel mailing list