* Re: [PATCH net-next v2] net: sfp: clean up i2c-bus property parsing
[not found] ` <202212040026.WN9NQzqq-lkp@intel.com>
@ 2022-12-03 17:24 ` Russell King (Oracle)
0 siblings, 0 replies; only message in thread
From: Russell King (Oracle) @ 2022-12-03 17:24 UTC (permalink / raw)
To: kernel test robot, devicetree, linux-acpi, netdev; +Cc: llvm, oe-kbuild-all
On Sun, Dec 04, 2022 at 12:40:25AM +0800, kernel test robot wrote:
> Thank you for the patch! Perhaps something to improve:
Sigh... this is another stupidity.
> 73970055450eeb Russell King 2017-07-25 2701 if (pdev->dev.of_node) {
> 73970055450eeb Russell King 2017-07-25 @2702 struct device_node *node = pdev->dev.of_node;
"node" declared here...
> 259c8618b0099b Russell King 2017-12-14 2703 const struct of_device_id *id;
> 73970055450eeb Russell King 2017-07-25 2704
> 259c8618b0099b Russell King 2017-12-14 2705 id = of_match_node(sfp_of_match, node);
... and clearly used here, so the code looks to be correct.
However, when CONFIG_OF is not set, of_match_node() does not make use
of this argument:
#define of_match_node(_matches, _node) NULL
which results in otherwise correct code issuing a warning when
CONFIG_OF is disabled... and sure enough, your configuration has:
> # CONFIG_OF is not set
This illustrates just how bad an idea it is to use compiler macros for
this stuff - it actively hurts compile testing, because you have to
test every damn combination of configuration options to get proper
coverage, which is totally and utterly rediculous.
of_match_node() and ACPI_HANDLE_FWNODE() should *both* be inline
functions when the subsystem is disabled, so that incorrect arguments
can be detected, and warnings about unused variables such as the one
you're reporting here doesn't happen.
While the issue lies firmly in the realms of the DT (and ACPI) headers,
I will yet again respin this patch to sort this out - but really the
correct solution is to fix the bloody headers so compile coverage
actually works.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-03 17:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1p1OIG-0098J4-EV@rmk-PC.armlinux.org.uk>
[not found] ` <202212040026.WN9NQzqq-lkp@intel.com>
2022-12-03 17:24 ` [PATCH net-next v2] net: sfp: clean up i2c-bus property parsing Russell King (Oracle)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).