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: <CAL_Jsq+BwHSj1XUNp_eY362XnNoOqVTNHqAkvnbgece8ZQE3Qw@mail.gmail.com>
Date:   Tue, 6 Aug 2019 15:26:53 -0600
From:   Rob Herring <robh+dt@...nel.org>
To:     Saravana Kannan <saravanak@...gle.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Frank Rowand <frowand.list@...il.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Android Kernel Team <kernel-team@...roid.com>,
        devicetree@...r.kernel.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] of/platform: Disable generic device linking code for PowerPC

On Tue, Aug 6, 2019 at 1:27 PM Saravana Kannan <saravanak@...gle.com> wrote:
>
> PowerPC platforms don't use the generic of/platform code to populate the
> devices from DT.

Yes, they do.

> Therefore the generic device linking code is never used
> in PowerPC.  Compile it out to avoid warning about unused functions.

I'd prefer this get disabled on PPC using 'if (IS_ENABLED(CONFIG_PPC))
return' rather than #ifdefs.

>
> If a specific PowerPC platform wants to use this code in the future,
> bringing this back for PowerPC would be trivial. We'll just need to export
> of_link_to_suppliers() and then let the machine specific files do the
> linking as they populate the devices from DT.
>
> Signed-off-by: Saravana Kannan <saravanak@...gle.com>
> ---
>  drivers/of/platform.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index f68de5c4aeff..a2a4e4b79d43 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -506,6 +506,7 @@ int of_platform_default_populate(struct device_node *root,
>  }
>  EXPORT_SYMBOL_GPL(of_platform_default_populate);
>
> +#ifndef CONFIG_PPC
>  static bool of_link_is_valid(struct device_node *con, struct device_node *sup)
>  {
>         of_node_get(sup);
> @@ -683,7 +684,6 @@ static int of_link_to_suppliers(struct device *dev)
>         return __of_link_to_suppliers(dev, dev->of_node);
>  }
>
> -#ifndef CONFIG_PPC
>  static const struct of_device_id reserved_mem_matches[] = {
>         { .compatible = "qcom,rmtfs-mem" },
>         { .compatible = "qcom,cmd-db" },
> --
> 2.22.0.770.g0f2c4a37fd-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ