All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: linux-sh@vger.kernel.org
Subject: Re: [Linux-kernel] [RFC 3/6] ARM: shmobile: add sh_pm_runtime_init() to header
Date: Mon, 17 Mar 2014 17:15:33 +0000	[thread overview]
Message-ID: <53273BC0.6090109@cogentembedded.com> (raw)
In-Reply-To: <1395055999.12161.116.camel@xylophone>

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


      parent reply	other threads:[~2014-03-17 17:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17 11:33 [Linux-kernel] [RFC 3/6] ARM: shmobile: add sh_pm_runtime_init() to header Ben Hutchings
2014-03-17 12:12 ` Sergei Shtylyov
2014-03-17 14:28 ` Ben Hutchings
2014-03-17 17:15 ` Sergei Shtylyov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53273BC0.6090109@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=linux-sh@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.