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: <CAGETcx868QWj0jMJ+U-eL62jT-LO_LTOw5EcwEKptfFOVa=A5A@mail.gmail.com>
Date:   Tue, 31 Aug 2021 10:30:39 -0700
From:   Saravana Kannan <saravanak@...gle.com>
To:     Ulf Hansson <ulf.hansson@...aro.org>
Cc:     Rob Herring <robh@...nel.org>, devicetree@...r.kernel.org,
        "Rafael J . Wysocki" <rjw@...ysocki.net>,
        Stephen Boyd <sboyd@...nel.org>,
        Dmitry Osipenko <digetx@...il.com>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 1/2] of: property: fw_devlink: Rename 'node_not_dev' to 'optional_con_dev'

On Tue, Aug 31, 2021 at 3:21 AM Ulf Hansson <ulf.hansson@...aro.org> wrote:
>
> In the struct supplier_bindings the member 'node_not_dev' is described as
> "The consumer node containing the property is never a device.", but that
> doesn't match the behaviour of the code in of_link_property().
>
> To make the behaviour consistent with the description, let's rename the
> member to "optional_con_dev" and clarify the corresponding comment.
>
> Signed-off-by: Ulf Hansson <ulf.hansson@...aro.org>
> ---
>  drivers/of/property.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/of/property.c b/drivers/of/property.c
> index 6c028632f425..2babb1807228 100644
> --- a/drivers/of/property.c
> +++ b/drivers/of/property.c
> @@ -1249,7 +1249,8 @@ static struct device_node *parse_##fname(struct device_node *np,       \
>   * @parse_prop.index: For properties holding a list of phandles, this is the
>   *                   index into the list
>   * @optional: Describes whether a supplier is mandatory or not
> - * @node_not_dev: The consumer node containing the property is never a device.
> + * @optional_con_dev: The consumer node containing the property may not be a
> + *                   device, then try finding one from an ancestor node.

Nak. This flag is not about "may not be". This is explicitly for
"never a device". It has to do with stuff like remote-endpoint which
is never listed under the root node of the device node. Your
documentation change is changing the meaning of the flag.

-Saravana

>   *
>   * Returns:
>   * parse_prop() return values are
> @@ -1261,7 +1262,7 @@ struct supplier_bindings {
>         struct device_node *(*parse_prop)(struct device_node *np,
>                                           const char *prop_name, int index);
>         bool optional;
> -       bool node_not_dev;
> +       bool optional_con_dev;
>  };
>
>  DEFINE_SIMPLE_PROP(clocks, "clocks", "#clock-cells")
> @@ -1370,7 +1371,7 @@ static const struct supplier_bindings of_supplier_bindings[] = {
>         { .parse_prop = parse_pinctrl6, },
>         { .parse_prop = parse_pinctrl7, },
>         { .parse_prop = parse_pinctrl8, },
> -       { .parse_prop = parse_remote_endpoint, .node_not_dev = true, },
> +       { .parse_prop = parse_remote_endpoint, .optional_con_dev = true, },
>         { .parse_prop = parse_gpio_compat, },
>         { .parse_prop = parse_interrupts, },
>         { .parse_prop = parse_regulators, },
> @@ -1415,7 +1416,7 @@ static int of_link_property(struct device_node *con_np, const char *prop_name)
>                 while ((phandle = s->parse_prop(con_np, prop_name, i))) {
>                         struct device_node *con_dev_np;
>
> -                       con_dev_np = s->node_not_dev
> +                       con_dev_np = s->optional_con_dev
>                                         ? of_get_compat_node(con_np)
>                                         : of_node_get(con_np);
>                         matched = true;
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ