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:   Fri, 4 May 2018 09:44:25 +0200
From:   Rasmus Villemoes <rasmus.villemoes@...vas.dk>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Rob Herring <robh+dt@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
        Jason Cooper <jason@...edaemon.net>,
        Marc Zyngier <marc.zyngier@....com>,
        Andy Tang <andy.tang@....com>,
        Alexander Stein <alexander.stein@...tec-electronic.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/2] irqchip: add support for Layerscape external
 interrupt lines

On 2018-03-01 13:16, Thomas Gleixner wrote:
> On Fri, 23 Feb 2018, Rasmus Villemoes wrote:
>> +#include <linux/irq.h>
>> +#include <linux/irqchip.h>
>> +#include <linux/irqdomain.h>
>> +#include <linux/of.h>
> 
> of.h is already included from of_irq.h and of_address.h

Yes. But if we're ever going to have a chance of reducing the median
header bloat factor from the current ~200x [1], one must stop relying on
headers pulling in other headers, so I much prefer including the headers
that declare the interfaces I use. And now that I look closer, I don't
actually use anything from of_irq.h, so that's gone. But I'll keep both
of.h and of_address.h.

>> +#include <linux/of_irq.h>
>> +#include <linux/of_address.h>

>> +static int
>> +ls_extirq_set_type(struct irq_data *data, unsigned int type)
>> +{
>> +	irq_hw_number_t hwirq = data->hwirq;
>> +	struct extirq_chip_data *chip_data = data->chip_data;
>> +	u32 value, mask;
> 
> Please order local variables in reverse fir tree fashion whenever
> possible. That's way simpler to read:
> 
> 	struct extirq_chip_data *chip_data = data->chip_data;
> 	irq_hw_number_t hwirq = data->hwirq;
> 	u32 value, mask;

Fixed, thanks.

Rasmus

[1] https://wildmoose.dk/header-bloat/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ