mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Bolle <pebolle@tiscali.nl>
To: Jim Cromie <jim.cromie@gmail.com>
Cc: rusty@rustcorp.com.au, linux-kernel@vger.kernel.org,
	bp@amd64.org, pawel.moll@arm.com, jbaron@redhat.com,
	gregkh@linuxfoundation.org
Subject: Re: [PATCH] init: add comments to keep initcall-names in sync with initcall levels
Date: Thu, 14 Jun 2012 21:23:03 +0200	[thread overview]
Message-ID: <1339701783.5981.5.camel@x61.thuisdomein> (raw)
In-Reply-To: <1339699862-3731-1-git-send-email-jim.cromie@gmail.com>

On Thu, 2012-06-14 at 12:51 -0600, Jim Cromie wrote:
> main.c has initcall_level_names[] for parse_args to print in debug messages,
> add comments to keep them in sync with initcalls defined in init.h.
> Also tweak comment re not using *_initcall macros in loadable modules.
> 
> Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
> ---
>  include/linux/init.h |    3 ++-
>  init/main.c          |    1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/init.h b/include/linux/init.h
> index 6b95109..da6f6f9 100644
> --- a/include/linux/init.h
> +++ b/include/linux/init.h
> @@ -191,6 +191,7 @@ extern bool initcall_debug;
>   * initializes variables that couldn't be statically initialized.
>   *
>   * This only exists for built-in code, not for modules.
> + * Keep main.c:initcall_level_names[] in sync. */
>   */

This comment now ends with "*/" twice. Perhaps that's legal (I haven't
even bothered to check) but it is really too ugly. 

>  #define pure_initcall(fn)		__define_initcall("0",fn,0)
>  
> @@ -280,7 +281,7 @@ void __init parse_early_options(char *cmdline);
>  
>  #else /* MODULE */
>  
> -/* Don't use these in modules, but some people do... */
> +/* Don't use these in loadable modules, but some people do... */

What problem does this solve?

>  #define early_initcall(fn)		module_init(fn)
>  #define core_initcall(fn)		module_init(fn)
>  #define postcore_initcall(fn)		module_init(fn)
> diff --git a/init/main.c b/init/main.c
> index b5cc0a7..7a74087 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -724,6 +724,7 @@ static initcall_t *initcall_levels[] __initdata = {
>  	__initcall_end,
>  };
>  
> +/* Keep these in sync with initcalls in include/linux/init.h */
>  static char *initcall_level_names[] __initdata = {
>  	"early",
>  	"core",


Paul Bolle


  parent reply	other threads:[~2012-06-14 19:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120612105913.GA8404@aftab.osrc.amd.com>
2012-06-14 18:51 ` Jim Cromie
2012-06-14 19:01   ` Borislav Petkov
2012-06-14 19:23   ` Paul Bolle [this message]
2012-06-14 19:47     ` Borislav Petkov
2012-06-14 20:32     ` Jim Cromie
2012-06-14 21:21       ` Paul Bolle
2012-06-14 21:41         ` Borislav Petkov
2012-06-14 22:00 Jim Cromie
2012-06-15 10:29 ` Borislav Petkov
2012-06-18  6:34   ` Rusty Russell

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=1339701783.5981.5.camel@x61.thuisdomein \
    --to=pebolle@tiscali.nl \
    --cc=bp@amd64.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jbaron@redhat.com \
    --cc=jim.cromie@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pawel.moll@arm.com \
    --cc=rusty@rustcorp.com.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®