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]
Message-ID: <56FC7491.5050000@huawei.com>
Date:	Thu, 31 Mar 2016 08:51:29 +0800
From:	Jiang Qiu <qiujiang@...wei.com>
To:	Andy Shevchenko <andy.shevchenko@...il.com>,
	Alan Tull <delicious.quinoa@...il.com>
CC:	Linus Walleij <linus.walleij@...aro.org>,
	Alexandre Courbot <gnurou@...il.com>,
	Mika Westerberg <mika.westerberg@...ux.intel.com>,
	Jamie Iles <jamie@...ieiles.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	<linuxarm@...wei.com>, <haifeng.wei@...wei.com>,
	<charles.chenxin@...wei.com>, atull <atull@...nsource.altera.com>
Subject: Re: [PATCH v6 1/2] gpio: dwapb: convert device node to fwnode

在 2016/3/30 19:38, Andy Shevchenko 写道:
> On Tue, Mar 29, 2016 at 7:30 PM, Alan Tull <delicious.quinoa@...il.com> wrote:
>> On Fri, Mar 25, 2016 at 9:31 PM, qiujiang <qiujiang@...wei.com> wrote:
>>
>>> -               if (pp->idx == 0 &&
>>> -                   of_property_read_bool(port_np, "interrupt-controller")) {
>>> -                       pp->irq = irq_of_parse_and_map(port_np, 0);
>>> +               if (dev->of_node && pp->idx == 0 &&
>>> +                       fwnode_property_read_bool(fwnode,
>>> +                                                 "interrupt-controller")) {
>>> +                       pp->irq = irq_of_parse_and_map(to_of_node(fwnode), 0);
>>>                         if (!pp->irq) {
>>>                                 dev_warn(dev, "no irq for bank %s\n",
>>> -                                        port_np->full_name);
>>> +                                        to_of_node(fwnode)->full_name);
>>>                         }
>>>                 }
>>>
>>>                 pp->irq_shared  = false;
>>>                 pp->gpio_base   = -1;
>>> -               pp->name        = port_np->full_name;
>>> +               if (dev->of_node)
>>> +                       pp->name = to_of_node(fwnode)->full_name;
>>
>> Hi Jiang,
>>
>> I tested lightly on a CycloneV and it worked fine (with device tree).
>>
>> One suggestion for both patches: you could remove name from struct
>> dwapb_port_property and get rid of pp->name and nobody would miss it.
>> All it is used for is some dev_err's so the device info gets printed
>> anyway.  For example (if I leave the irq out of the DT)
>>
>> gpio-dwapb ff708000.gpio: no irq for bank /soc/gpio@...08000/gpio-controller@0
>>
>> is redundant.  The only additional info here from the name is the port
>> index.  That could be added to the messages without having to get the
>> name through the two property/of methods.
>>
> 
> Good suggestion! That'll make patches and code cleaner.
> 
> Perhaps separate prepended  patch?
> 
Hi Alan/Andy,

It sounds good, I will follow this suggestion and do a test. But, what's the
"separate prepended patch" mean?

Thanks, Jiang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ