[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqJT3UNVKpAt+3g-tosy=uCZTosUxD4RfVYjMJ-gpGmPiA@mail.gmail.com>
Date: Tue, 20 Aug 2019 12:16:43 -0500
From: Rob Herring <robh+dt@...nel.org>
To: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
Cc: Catalin Marinas <catalin.marinas@....com>,
Christoph Hellwig <hch@....de>,
Stefan Wahren <wahrenst@....net>,
Marc Zyngier <marc.zyngier@....com>,
Robin Murphy <robin.murphy@....com>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@...ts.infradead.org>, devicetree@...r.kernel.org,
"open list:GENERIC INCLUDE/ASM HEADER FILES"
<linux-arch@...r.kernel.org>,
Linux IOMMU <iommu@...ts.linux-foundation.org>,
linux-mm@...ck.org, linux-riscv@...ts.infradead.org,
Frank Rowand <frowand.list@...il.com>, phill@...pberryi.org,
Florian Fainelli <f.fainelli@...il.com>,
Will Deacon <will@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Eric Anholt <eric@...olt.net>,
Matthias Brugger <mbrugger@...e.com>,
"moderated list:BROADCOM BCM2835 ARM ARCHITECTURE"
<linux-rpi-kernel@...ts.infradead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Marek Szyprowski <m.szyprowski@...sung.com>
Subject: Re: [PATCH v2 03/11] of/fdt: add of_fdt_machine_is_compatible function
On Tue, Aug 20, 2019 at 9:58 AM Nicolas Saenz Julienne
<nsaenzjulienne@...e.de> wrote:
>
> Provides the same functionality as of_machine_is_compatible.
>
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
> ---
>
> Changes in v2: None
>
> drivers/of/fdt.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index 9cdf14b9aaab..06ffbd39d9af 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -802,6 +802,13 @@ const char * __init of_flat_dt_get_machine_name(void)
> return name;
> }
>
> +static const int __init of_fdt_machine_is_compatible(char *name)
No point in const return (though name could possibly be const), and
the return could be bool instead.
With that,
Reviewed-by: Rob Herring <robh@...nel.org>
> +{
> + unsigned long dt_root = of_get_flat_dt_root();
> +
> + return of_flat_dt_is_compatible(dt_root, name);
> +}
> +
> /**
> * of_flat_dt_match_machine - Iterate match tables to find matching machine.
> *
> --
> 2.22.0
>
Powered by blists - more mailing lists