[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3NinqnO0udFp21DyB1gdqa=vdavWgEpysfJFFs=V5hjA@mail.gmail.com>
Date: Mon, 25 Jan 2021 10:46:31 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: Stephen Boyd <swboyd@...omium.org>
Cc: Rob Herring <robh@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
DTML <devicetree@...r.kernel.org>,
Frank Rowand <frowand.list@...il.com>,
Arnd Bergmann <arnd@...db.de>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH v2 6/6] of/device: Don't NULLify match table in
of_match_device() with CONFIG_OF=n
On Sat, Jan 23, 2021 at 4:44 AM Stephen Boyd <swboyd@...omium.org> wrote:
>
> This effectively reverts 1db73ae39a97 ("of/device: Nullify match table
> in of_match_device() for CONFIG_OF=n") because that commit makes it more
> surprising to users of this API that the arguments may never be
> referenced by any code. This is because the pre-processor will replace
> the argument with NULL and then the match table will be left unreferenced
> by any code but the compiler optimizer doesn't know to drop it. This can
> lead to compilers warning that match tables are unused, when we really
> want to pass the match table to the API but have the compiler see that
> it's all inlined and not used and then drop the match table while
> silencing the warning. We're being too smart here and not giving the
> compiler the chance to do dead code elimination.
>
> Signed-off-by: Stephen Boyd <swboyd@...omium.org>
> Acked-by: Frank Rowand <frowand.list@...il.com>
> Cc: Arnd Bergmann <arnd@...db.de>
> Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
> Cc: Rob Herring <robh+dt@...nel.org>
> Cc: Frank Rowand <frowand.list@...il.com>
Reviewed-by: Arnd Bergmann <arnd@...db.de>
Powered by blists - more mailing lists