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] [day] [month] [year] [list]
Message-ID: <20171030184649.GA99279@google.com>
Date:   Mon, 30 Oct 2017 11:46:51 -0700
From:   Brian Norris <briannorris@...omium.org>
To:     jeffy <jeffy.chen@...k-chips.com>
Cc:     Rob Herring <robh@...nel.org>, linux-kernel@...r.kernel.org,
        bhelgaas@...gle.com, linux-pm@...r.kernel.org, tony@...mide.com,
        shawn.lin@...k-chips.com, rjw@...ysocki.net, dianders@...omium.org,
        Frank Rowand <frowand.list@...il.com>,
        devicetree@...r.kernel.org
Subject: Re: [RFC PATCH v8 4/7] of/irq: Adjust of pci irq parsing for
 multiple interrupts

On Mon, Oct 30, 2017 at 10:05:51AM +0800, Jeffy Chen wrote:
> On 10/27/2017 10:38 PM, Rob Herring wrote:
> >>+		prop = of_find_property(dn, "interrupt-names", NULL);
> >>>+		for (name = of_prop_next_string(prop, NULL); name;
> >>>+		     name = of_prop_next_string(prop, name), index++) {
> >>>+			if (!strcmp(name, "pci"))
> >>>+				break;
> >Use of_property_match_string
> >
> i'm trying to find the first unnamed or "pci" named irq in the
> string array, so cannot use that API:)

Actually, why can't you? It does exactly what your loop does right now.
You'd just need to handle the -ENODATA case better. e.g., check if we
have an interrupt-names property -- if not, just take index 0; if so,
then use of_property_match_string().

Brian

> but will change to of_property_for_each_string as Brian suggested.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ