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: <1552282615.10179.25.camel@mhfsdcap03>
Date:   Mon, 11 Mar 2019 13:36:55 +0800
From:   Chunfeng Yun <chunfeng.yun@...iatek.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
CC:     Rob Herring <robh+dt@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Mark Rutland <mark.rutland@....com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Adam Thomson <Adam.Thomson.Opensource@...semi.com>,
        Li Jun <jun.li@....com>,
        "Badhri Jagan Sridharan" <badhri@...gle.com>,
        Hans de Goede <hdegoede@...hat.com>,
        Min Guo <min.guo@...iatek.com>,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        USB <linux-usb@...r.kernel.org>,
        linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
        "moderated list:ARM/Mediatek SoC support" 
        <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH 3/5] usb: roles: add API to get usb_role_switch by node

Hi,

On Fri, 2019-03-08 at 08:52 +0200, Andy Shevchenko wrote:
> On Fri, Mar 8, 2019 at 8:14 AM Chunfeng Yun <chunfeng.yun@...iatek.com> wrote:
> >
> > Add usb_role_switch_get_by_node() to make easier to get
> > usb_role_switch by node which register it.
> > It's useful when there is not device_connection registered
> > between two drivers and only knows the node which register
> > usb_role_switch.
> 
> > +static int __switch_match_node(struct device *dev, const void *node)
> > +{
> > +       return dev->parent->of_node == (const struct device_node *)node;
> > +}
> 
> Hmm... Shouldn't be slightly better to compare fwnode instead?
> 
Using fwnode is indeed suitable for more cases,
I find that there are many functions named xx_by_node using node, but
not fwnode, is there any rules about choice between device_node and
fwnode_handle?

Thanks


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ