Message ID | 1395054917-27390-4-git-send-email-ben.dooks@codethink.co.uk (mailing list archive) |
---|---|
State | RFC |
Headers | show |
On Mon, 2014-03-17 at 11:15 +0000, Ben Dooks wrote: > Add definition of sh_pm_runtime_init() to machine header to allow calling declaration not definition > the pm_runtime initialisation code. > > Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> > --- > arch/arm/mach-shmobile/include/mach/common.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h > index cb8e32d..4727d4f 100644 > --- a/arch/arm/mach-shmobile/include/mach/common.h > +++ b/arch/arm/mach-shmobile/include/mach/common.h > @@ -52,4 +52,6 @@ static inline void __init shmobile_init_late(void) > shmobile_cpuidle_init(); > } > > +extern int sh_pm_runtime_init(void); > + > #endif /* __ARCH_MACH_COMMON_H */ The declaration should include '__init' and need not include 'extern'. I would fold this into the previous patch. Ben. -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello. On 17-03-2014 15:33, Ben Hutchings wrote: >> Add definition of sh_pm_runtime_init() to machine header to allow calling > declaration not definition >> the pm_runtime initialisation code. >> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> >> --- >> arch/arm/mach-shmobile/include/mach/common.h | 2 ++ >> 1 file changed, 2 insertions(+) >> diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h >> index cb8e32d..4727d4f 100644 >> --- a/arch/arm/mach-shmobile/include/mach/common.h >> +++ b/arch/arm/mach-shmobile/include/mach/common.h >> @@ -52,4 +52,6 @@ static inline void __init shmobile_init_late(void) >> shmobile_cpuidle_init(); >> } >> >> +extern int sh_pm_runtime_init(void); >> + >> #endif /* __ARCH_MACH_COMMON_H */ > The declaration should include '__init' Since when? It makes no sense for declarations. > and need not include 'extern'. WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, 2014-03-17 at 16:12 +0400, Sergei Shtylyov wrote: > Hello. > > On 17-03-2014 15:33, Ben Hutchings wrote: > > >> Add definition of sh_pm_runtime_init() to machine header to allow calling > > > declaration not definition > > >> the pm_runtime initialisation code. > > >> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> > >> --- > >> arch/arm/mach-shmobile/include/mach/common.h | 2 ++ > >> 1 file changed, 2 insertions(+) > > >> diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h > >> index cb8e32d..4727d4f 100644 > >> --- a/arch/arm/mach-shmobile/include/mach/common.h > >> +++ b/arch/arm/mach-shmobile/include/mach/common.h > >> @@ -52,4 +52,6 @@ static inline void __init shmobile_init_late(void) > >> shmobile_cpuidle_init(); > >> } > >> > >> +extern int sh_pm_runtime_init(void); > >> + > >> #endif /* __ARCH_MACH_COMMON_H */ > > > The declaration should include '__init' > > Since when? It makes no sense for declarations. It doesn't make any difference to the compiler, but it can be useful for the programmer to see it. Ben. > > and need not include 'extern'. > > WBR, Sergei > -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello. On 03/17/2014 05:28 PM, Ben Hutchings wrote: >>>> Add definition of sh_pm_runtime_init() to machine header to allow calling >>> declaration not definition >>>> the pm_runtime initialisation code. >>>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> >>>> --- >>>> arch/arm/mach-shmobile/include/mach/common.h | 2 ++ >>>> 1 file changed, 2 insertions(+) >>>> diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h >>>> index cb8e32d..4727d4f 100644 >>>> --- a/arch/arm/mach-shmobile/include/mach/common.h >>>> +++ b/arch/arm/mach-shmobile/include/mach/common.h >>>> @@ -52,4 +52,6 @@ static inline void __init shmobile_init_late(void) >>>> shmobile_cpuidle_init(); >>>> } >>>> >>>> +extern int sh_pm_runtime_init(void); >>>> + >>>> #endif /* __ARCH_MACH_COMMON_H */ >>> The declaration should include '__init' >> Since when? It makes no sense for declarations. > It doesn't make any difference to the compiler, but it can be useful for > the programmer to see it. I personally use 'make TAGS' on the kernel directory, and EMACS then shows me the function definition, not declaration when I press <Alt>-<.> (I wish it always worked correctly though). In general, people tend to remove '__init' from the declarations as I could observe so far... > Ben. >>> and need not include 'extern'. WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index cb8e32d..4727d4f 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h @@ -52,4 +52,6 @@ static inline void __init shmobile_init_late(void) shmobile_cpuidle_init(); } +extern int sh_pm_runtime_init(void); + #endif /* __ARCH_MACH_COMMON_H */
Add definition of sh_pm_runtime_init() to machine header to allow calling the pm_runtime initialisation code. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> --- arch/arm/mach-shmobile/include/mach/common.h | 2 ++ 1 file changed, 2 insertions(+)