public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederik Deweerdt <deweerdt@free.fr>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Matthew Wilcox <matthew@wil.cx>, Jeff Garzik <jeff@garzik.org>,
	linux-kernel@vger.kernel.org, arjan@infradead.org,
	alan@lxorguk.ukuu.org.uk, akpm@osdl.org, rdunlap@xenotime.net,
	gregkh@suse.de
Subject: Re: [RFC PATCH] add pci_{request,free}_irq take #3
Date: Fri, 6 Oct 2006 10:31:27 +0000	[thread overview]
Message-ID: <20061006103127.GJ352@slug> (raw)
In-Reply-To: <20061006100421.GA5335@martell.zuzino.mipt.ru>

On Fri, Oct 06, 2006 at 02:04:21PM +0400, Alexey Dobriyan wrote:
> On Thu, Oct 05, 2006 at 02:36:07PM +0000, Frederik Deweerdt wrote:
> > > > - is_irq_valid() called by pci_request_irq()
> > >
> > > s/is_irq_valid/valid_irq/g methinks.
> > The point of the is_ prefix is to make it clear that we're returning 1
> > if it's true and 0 if it's false.
> > <checks thread on return values>
> > err... you said[1]:
> > > There are at least 3 idioms:
> > > [...]
> > > 2) return 1 on YES, 0 on NO.
> > > [...]
> > > #2 should only be used if condition in question is spelled nice:
> > Which I thought made sense, and that's why the is_ prefix is there now.
> > Am I missing something?
> 
> I think, looking at
> 
> 	if (irq_valid(irq))
> 
> one can be damn sure it follows common convention.
That maybe true, however the is_ prefix just rules out any ambiguity.
Using is/has/have/can for boolean functions whenever possible is a good
practice and I'd prefer to stick to it.
> That "is_" prefix just beats my ears. If is irq valid.
I understand your concerns on the "sound" issues though. Does
is_valid_irq() sound better to you?

Thanks,
Frederik

      reply	other threads:[~2006-10-06 10:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-04 19:32 [RFC PATCH] add pci_{request,free}_irq take #3 Frederik Deweerdt
2006-10-04 19:43 ` [RFC PATCH] move aic7xxx to pci_request_irq Frederik Deweerdt
2006-10-04 19:44 ` [RFC PATCH] move aic79xx " Frederik Deweerdt
2006-10-04 19:46 ` [RFC PATCH] move tg3 " Frederik Deweerdt
2006-10-04 19:46 ` [RFC PATCH] move e1000 " Frederik Deweerdt
2006-10-04 19:50 ` [RFC PATCH] add pci_{request,free}_irq take #3 Jeff Garzik
2006-10-04 20:29   ` Frederik Deweerdt
2006-10-04 20:33     ` Matthew Wilcox
2006-10-04 21:26       ` Frederik Deweerdt
2006-10-05 13:59         ` Alexey Dobriyan
2006-10-05 14:36           ` Frederik Deweerdt
2006-10-06 10:04             ` Alexey Dobriyan
2006-10-06 10:31               ` Frederik Deweerdt [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=20061006103127.GJ352@slug \
    --to=deweerdt@free.fr \
    --cc=adobriyan@gmail.com \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arjan@infradead.org \
    --cc=gregkh@suse.de \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=rdunlap@xenotime.net \
    /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