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:   Mon, 11 May 2020 11:14:44 -0700
From:   Saravana Kannan <saravanak@...gle.com>
To:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] slimbus: core: Set fwnode for a device when setting of_node

On Mon, May 11, 2020 at 8:13 AM Srinivas Kandagatla
<srinivas.kandagatla@...aro.org> wrote:
>
> From: Saravana Kannan <saravanak@...gle.com>
>
> When setting the of_node for a newly created device, also set the
> fwnode. This allows fw_devlink feature to work for slimbus devices.
>
> Also, remove some unnecessary NULL checks. The functions in question
> already do NULL checks.
>
> Signed-off-by: Saravana Kannan <saravanak@...gle.com>
> [Srini: removed unnecessary NULL check from other patch]
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
> ---
>  drivers/slimbus/core.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c
> index 526e3215d8fe..1f3beee74fdf 100644
> --- a/drivers/slimbus/core.c
> +++ b/drivers/slimbus/core.c
> @@ -162,9 +162,8 @@ static int slim_add_device(struct slim_controller *ctrl,
>         sbdev->ctrl = ctrl;
>         INIT_LIST_HEAD(&sbdev->stream_list);
>         spin_lock_init(&sbdev->stream_list_lock);
> -
> -       if (node)
> -               sbdev->dev.of_node = of_node_get(node);
> +       sbdev->dev.of_node = of_node_get(node);
> +       sbdev->dev.fwnode = of_fwnode_handle(node);
>
>         dev_set_name(&sbdev->dev, "%x:%x:%x:%x",
>                                   sbdev->e_addr.manf_id,
> --
> 2.21.0

The edits look fine to me.

-Saravana

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ