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: <CAJZ5v0hLYHOSvh+695XbZZgqk=mt7gFHwPMi3Bfviq5sWcOs_w@mail.gmail.com>
Date:   Mon, 10 May 2021 16:57:37 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH v1 1/2] device property: Retrieve fwnode from of_node via accessor

On Mon, May 10, 2021 at 11:57 AM Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
>
> OF provides a specific accessor to retrieve fwnode handle.
> Use it instead of direct dereferencing.
>
> Signed-off-by: Andy Shevchenko <andy.shevchenko@...il.com>
> ---
>  drivers/base/property.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/base/property.c b/drivers/base/property.c
> index 1421e9548857..dd98759d688b 100644
> --- a/drivers/base/property.c
> +++ b/drivers/base/property.c
> @@ -21,7 +21,7 @@
>  struct fwnode_handle *dev_fwnode(struct device *dev)
>  {
>         return IS_ENABLED(CONFIG_OF) && dev->of_node ?
> -               &dev->of_node->fwnode : dev->fwnode;
> +               of_fwnode_handle(dev->of_node) : dev->fwnode;
>  }
>  EXPORT_SYMBOL_GPL(dev_fwnode);
>
> @@ -763,7 +763,7 @@ struct fwnode_handle *device_get_next_child_node(struct device *dev,
>         struct fwnode_handle *fwnode = NULL, *next;
>
>         if (dev->of_node)
> -               fwnode = &dev->of_node->fwnode;
> +               fwnode = of_fwnode_handle(dev->of_node);
>         else if (adev)
>                 fwnode = acpi_fwnode_handle(adev);
>
> --

Applied as 5.14 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ