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:   Mon, 22 Jan 2018 09:26:17 +0000
From:   Lee Jones <lee.jones@...aro.org>
To:     Marc Zyngier <marc.zyngier@....com>
Cc:     Paul Cercueil <paul@...pouillou.net>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...eaurora.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Jason Cooper <jason@...edaemon.net>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        linux-clk@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 6/9] irqchip: Add the ingenic-tcu-intc driver

On Sat, 20 Jan 2018, Marc Zyngier wrote:

> On Thu, 11 Jan 2018 17:25:45 +0100
> Paul Cercueil <paul@...pouillou.net> wrote:
> 
> > Hi Marc,
> > 
> > >>  +static int __init ingenic_tcu_intc_of_init(struct device_node 
> > >> *node,
> > >>  +	struct device_node *parent)
> > >>  +{
> > >>  +	struct irq_domain *domain;
> > >>  +	struct irq_chip_generic *gc;
> > >>  +	struct irq_chip_type *ct;
> > >>  +	int err, i, num_parent_irqs;
> > >>  +	unsigned int parent_irqs[3];  
> > > 
> > > 3 parent interrupts? Really? How do you pick one? Also, given the 
> > > useage
> > > model below, "int" is the wrong type. Probably should be u32.  
> > 
> > See below.
> > 
> > >>  +	struct regmap *map;
> > >>  +
> > >>  +	num_parent_irqs = of_property_count_elems_of_size(
> > >>  +			node, "interrupts", 4);  
> > > 
> > > Nit: on a single line, as here is nothing that hurts my eyes more than
> > > reading something like(
> > > this). Also, 4 is better expressed as sizeof(u32).  
> > 
> > That will make checkpatch.pl unhappy :(
> 
> And I don't care about checkpatch. I maintain the irqchip stuff, while
> checkpatch doesn't. Hence, I win.

	num_parent_irqs =
		of_property_count_elems_of_size(node, "interrupts", 4);  

Everybody wins!

-- 
Lee Jones
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ