linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
	Michal Marek <mmarek@suse.cz>,
	Arnaud Lacombe <lacombar@gmail.com>,
	linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
	x86@kernel.org, Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH v2] kconfig: autogenerated config_is_xxx macro
Date: Fri, 13 May 2011 14:21:12 +0200	[thread overview]
Message-ID: <20110513122112.GA469@elte.hu> (raw)
In-Reply-To: <BANLkTikXCQd+DaSD6o5Xdakk760wBTDq=Q@mail.gmail.com>


* Alexey Dobriyan <adobriyan@gmail.com> wrote:

> On Fri, May 13, 2011 at 1:01 PM, Ingo Molnar <mingo@elte.hu> wrote:
> >
> > * Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> wrote:
> >
> >> On 10:30 Fri 13 May     , Ingo Molnar wrote:
> >> >
> >> > * Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> wrote:
> >> >
> >> > > -#ifdef CONFIG_PCI_BIOS
> >> > > - if (!rt->signature) {
> >> > > + if (config_is_pci_bios() && !rt->signature) {
> >> >
> >> > Makes sense - but please name it in a more obvious way, such as:
> >> >
> >> >     pci_bios_enabled()
> >> the idea to generate the macro via Kconfig
> >
> > Okay, and there we are stuck with whatever the Kconfig name is. (we could
> > rename that but not needed really)
> >
> > Why not the canonical config_pci_bios() variant? It's the shortest one to
> > write. The '_is' looks pretty superfluous to me.
> >
> > Hm, i guess it could be mixed up with a function that configures the pci_bios.
> >
> > I guess since i don't have any better idea config_is_pci_bios() sounds like a
> > good choice after all.
> 
> But we don't name config options like CONFIG_IS_PCI_BIOS, do we?

The problem is that 'config' can be misunderstood as a verb - it's often used 
for function names to say 'to configure'.

By naming it 'config_is_()' it unambiguously becomes a noun.

Thanks,

	Ingo

  parent reply	other threads:[~2011-05-13 12:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06  5:03 [PATCH v2] kconfig: autogenerated config_is_xxx macro Jean-Christophe PLAGNIOL-VILLARD
2011-05-06 16:19 ` Arnaud Lacombe
2011-05-07  1:50   ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-09  8:52     ` Michal Marek
2011-05-13  8:09       ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-13  8:30         ` Ingo Molnar
2011-05-13  8:36           ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-13 10:01             ` Ingo Molnar
2011-05-13 10:21               ` Alexey Dobriyan
2011-05-13 10:38                 ` Michal Marek
2011-05-13 12:21                 ` Ingo Molnar [this message]
2011-05-14 10:02                   ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-13 15:19         ` Arnaud Lacombe
2011-05-16 19:03         ` Valdis.Kletnieks
2011-05-16 19:38           ` Arnaud Lacombe
2011-05-16 20:05             ` Michal Marek
2011-05-16 20:24               ` Arnaud Lacombe
2011-05-16 20:33                 ` Michal Marek
2011-05-17  1:08                   ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-17  1:03             ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-17 19:13               ` Valdis.Kletnieks
2011-05-18  5:27                 ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-13 16:26 ` Andi Kleen
2011-05-13 18:18 ` Arnaud Lacombe
2011-05-17 14:45 ` Michal Marek
2011-05-17 18:19   ` Jean-Christophe PLAGNIOL-VILLARD

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=20110513122112.GA469@elte.hu \
    --to=mingo@elte.hu \
    --cc=adobriyan@gmail.com \
    --cc=lacombar@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mmarek@suse.cz \
    --cc=plagnioj@jcrosoft.com \
    --cc=x86@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;
as well as URLs for NNTP newsgroup(s).