[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqK18GoqkNPePh1+jiEk0JoLH01yPr0dD0AkswXP1N+qzA@mail.gmail.com>
Date: Fri, 28 Aug 2020 17:09:52 -0600
From: Rob Herring <robh+dt@...nel.org>
To: Andrew Lunn <andrew@...n.ch>
Cc: devicetree@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] of: of_match_node: Make stub an inline function to avoid
W=1 warnings
On Fri, Aug 28, 2020 at 7:00 AM Andrew Lunn <andrew@...n.ch> wrote:
>
> On Fri, Aug 28, 2020 at 04:19:39AM +0200, Andrew Lunn wrote:
> > When building without CONFIG_OF and W=1, errors are given about unused
> > arrays of match data, because of_match_node is stubbed as a macro. The
> > compile does not see it takes parameters when not astub, so it
> > generates warnings about unused variables. Replace the stub with an
> > inline function to avoid these false warnings.
>
> Hi Rob
>
> So 0-day shows some people have worked around this with #ifdef
> CONFIG_OF around the match table.
>
> I checked the object code for the file i'm interested in. The
> optimiser has correctly throw away the match table and all code around
> it with the inline stub.
>
> Which do you prefer? This patch and i remove the #ifdef, or the old
> stub and if add #ifdef around the driver i'm getting warnings from?
Use of_device_get_match_data instead of of_match_node.
Rob
Powered by blists - more mailing lists