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:	Wed, 6 Jul 2016 10:05:52 +0900
From:	Masahiro Yamada <yamada.masahiro@...ionext.com>
To:	Linus Walleij <linus.walleij@...aro.org>
Cc:	Thierry Reding <thierry.reding@...il.com>,
	Alexandre Courbot <gnurou@...il.com>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: of: Allow overriding the device node

Hi.

2016-07-06 0:25 GMT+09:00 Linus Walleij <linus.walleij@...aro.org>:
> On Tue, Jul 5, 2016 at 2:11 PM, Thierry Reding <thierry.reding@...il.com> wrote:
>
>> From: Thierry Reding <treding@...dia.com>
>>
>> When registering a GPIO chip, drivers can override the device tree node
>> associated with the chip by setting the chip's ->of_node field. If set,
>> this field is supposed to take precedence over the ->parent->of_node
>> field, but the code doesn't actually do that.
>>
>> Commit 762c2e46c059 ("gpio: of: remove of_gpiochip_and_xlate() and
>> struct gg_data") exposes this because it now no longer matches on the
>> GPIO chip's ->of_node field, but the GPIO device's ->of_node field that
>> is set using the procedure described above.
>>
>> Signed-off-by: Thierry Reding <treding@...dia.com>
>
> Thanks for catching this, patch applied with Alexandre's ACK.
>
> Masahiro: does this look all right to you?

Yes.
Now, the code matches to the comment.  Nice!

Reviewed-by: Masahiro Yamada <yamada.masahiro@...ionext.com>


Question:

When we reference the node of gpiochip,
we should use
  chip->gpiodev->dev->of_node

instead of
  chip->of_node

because we can make chip->of_node optional
as long as chip->parent is set in the probe method.

Correct?






-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ