lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 8 Sep 2013 21:02:44 -0700
From:	Josh Triplett <josh@...htriplett.org>
To:	Michael Opdenacker <michael.opdenacker@...e-electrons.com>
Cc:	paul.mckenney@...aro.org, akpm@...ux-foundation.org,
	decot@...glers.com, amirv@...lanox.com,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH] genirq: add IRQF_NONE

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@...e-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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ