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/

Reply via email to