> -----Original Message-----
> From: Premi, Sanjeev [mailto:[email protected]]
> Sent: Thursday, January 06, 2011 8:03 PM
> To: Shilimkar, Santosh; [email protected]
> Cc: Hilman, Kevin; [email protected]; linux-arm-
> [email protected]; Shilimkar, Santosh; Paul Walmsley
> Subject: RE: [PATCH v2 2/5] omap2plus: prm: Trvial build break fix
> for undefined reference to 'omap2_prm_read_mod_reg'
>
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of
> > Santosh Shilimkar
> > Sent: Wednesday, January 05, 2011 4:27 PM
> > To: [email protected]
> > Cc: Hilman, Kevin; [email protected];
> > [email protected]; Shilimkar, Santosh;
> > Paul Walmsley
> > Subject: [PATCH v2 2/5] omap2plus: prm: Trvial build break
> > fix for undefined reference to 'omap2_prm_read_mod_reg'
>
> [snip]
>
> >
> >  #ifndef __ASSEMBLER__
> > -
> > +/*
> > + * Stub omap2xxx/omap3xxx functions so that common files
> > + * continue to build when custom builds are used
> > + */
> > +#if defined(CONFIG_ARCH_OMAP4) &&
> > !(defined(CONFIG_ARCH_OMAP2) ||     \
> > +                                   defined(CONFIG_ARCH_OMAP3))
> > +static inline u32 omap2_prm_read_mod_reg(s16 module, u16 idx)
> > +{
> > +   WARN_ONCE(1, "prm: omap2xxx/omap3xxx specific function and "
> > +           "not suppose to be used on omap4\n");
> > +   return 0;
> > +}
> Looking forward, the warning of incorrect SOC may be required
> for when kernel is build for one specific SOC.
>
> Wouldn't it be easy/better to have common global function:
>
> void wrong_soc(char* func, int soc_id)
> {
>       WARN_ONCE(1, "Function %s cannot be used for %d", func,
> soc_id);
> }
>
> OR we could have soc specific functions e.g.
>
> void omap2xxx_only (char* func)
> {
>       WARN_ONCE(1, "Function %s is specific to OMAP2XXX");
> }
> ..etc..
>
> Later these functions can be called from the stubs.
>
> This is prelim idea, will need to be worked upon.
>
Not sure. May appear like over engineering considering it's a
stub.
Paul can comment.

Regards,
Santosh
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to