public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: __setup_param(), unique_id and vdso_setup
Date: Wed, 6 May 2009 15:24:21 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.2.00.0905061519050.32023@localhost.lan> (raw)


  just going through my outstanding list of kernel cleanup pedantry,
and i was reminded of this from include/linux/init.h:

=====
...
#define __setup(str, fn)                                        \
        __setup_param(str, fn, fn, 0)

/* NOTE: fn is as per module_param, not __setup!  Emits warning if fn
 * returns non-zero. */
#define early_param(str, fn)                                    \
        __setup_param(str, fn, fn, 1)
...
=====

  in short, both invocations of __setup_param() use identical second
and third parameters, and a tree-wide grep shows:

$ grep -rw __setup_param *
arch/x86/vdso/vdso32-setup.c:__setup_param("vdso=", vdso32_setup, vdso_setup, 0);
include/linux/init.h:#define __setup_param(str, unique_id, fn, early)                   \
include/linux/init.h:   __setup_param(str, fn, fn, 0)
include/linux/init.h:   __setup_param(str, fn, fn, 1)
include/linux/init.h:#define __setup_param(str, unique_id, fn)  /* nothing */
$

  so apart from that single exception involving "vdso", that macro
could be simplified to just get rid of that third parameter.  is there
something special about the vdso boot-time parm that *requires* it to
be the only boot-time parm in the entire kernel to have a different
unique id?  just curious.  or does that have to be preserved for
out-of-tree builds?

rday
--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

        Linux Consulting, Training and Annoying Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Linked In:                             http://www.linkedin.com/in/rpjday
Twitter:                                       http://twitter.com/rpjday
========================================================================

             reply	other threads:[~2009-05-06 19:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-06 19:24 Robert P. J. Day [this message]
2009-05-09  7:32 ` __setup_param(), unique_id and vdso_setup Sam Ravnborg
2009-05-09 10:46   ` Robert P. J. Day

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=alpine.LFD.2.00.0905061519050.32023@localhost.lan \
    --to=rpjday@crashcourse.ca \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox