public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Josh Triplett <josh@joshtriplett.org>
To: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Cc: paul.mckenney@linaro.org, akpm@linux-foundation.org,
	decot@googlers.com, amirv@mellanox.com,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] genirq: add IRQF_NONE
Date: Sun, 8 Sep 2013 21:02:44 -0700	[thread overview]
Message-ID: <20130909040244.GA1157@leaf> (raw)
In-Reply-To: <1378698519-4780-1-git-send-email-michael.opdenacker@free-electrons.com>

On Mon, Sep 09, 2013 at 05:48:39AM +0200, Michael Opdenacker wrote:
> What about adding an IRQF_NONE flag as in the below patch?
> 
> I'm currently working on removing the use of the deprecated
> IRQF_DISABLED flag, and frequently have to replace
> IRQF_DISABLED by 0, typically in request_irq() arguments.
> 
> Using IRQF_NONE instead of 0 would make the code more readable,
> at least for people reading driver code for the first time.
> 
> Would it worth it?
> 
> I'm sure this kind of idea has come up many times before...
> 
> Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>

I don't think it makes sense, no; it's a flags field, meant to receive a
set of flags, and 0 is the standard empty set of flags.  I think
IRQF_NONE would actually reduce readability, especially for readers who
haven't seen it before, because it isn't immediately obvious that it
just corresponds to the 0 of "no flags".  My first guess reading it
would be that it's some non-zero flag with some non-obvious semantic,
such as "don't actually allocate an IRQ", or something strange like
that.

- Josh Triplett

  reply	other threads:[~2013-09-09  4:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-09  3:48 [RFC][PATCH] genirq: add IRQF_NONE Michael Opdenacker
2013-09-09  4:02 ` Josh Triplett [this message]
2013-09-09  4:40   ` Michael Opdenacker

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=20130909040244.GA1157@leaf \
    --to=josh@joshtriplett.org \
    --cc=akpm@linux-foundation.org \
    --cc=amirv@mellanox.com \
    --cc=decot@googlers.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.opdenacker@free-electrons.com \
    --cc=paul.mckenney@linaro.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