From: Andrew Lunn <andrew@lunn.ch>
To: robh+dt@kernel.org
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] of: of_match_node: Make stub an inline function to avoid W=1 warnings
Date: Fri, 28 Aug 2020 15:00:34 +0200 [thread overview]
Message-ID: <20200828130034.GA2912863@lunn.ch> (raw)
In-Reply-To: <20200828021939.2912798-1-andrew@lunn.ch>
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?
Andrew
next prev parent reply other threads:[~2020-08-28 13:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-28 2:19 [PATCH] of: of_match_node: Make stub an inline function to avoid W=1 warnings Andrew Lunn
2020-08-28 10:52 ` kernel test robot
2020-08-28 11:05 ` kernel test robot
2020-08-28 13:00 ` Andrew Lunn [this message]
2020-08-28 23:09 ` Rob Herring
2020-08-30 15:23 ` Andrew Lunn
2020-08-30 20:15 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200828130034.GA2912863@lunn.ch \
--to=andrew@lunn.ch \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox