* [PATCH] of: Make of_match_node() an inline stub for CONFIG_OF=n
@ 2017-04-06 19:32 Florian Fainelli
[not found] ` <20170406193224.10046-1-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Florian Fainelli @ 2017-04-06 19:32 UTC (permalink / raw)
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: andrew-g2DYL2Zd6BY,
vivien.didelot-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/, Florian Fainelli,
Rob Herring, Frank Rowand,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE
Make of_match_node() an inline function when CONFIG_OF=n which allows the
compiler to eliminate warnings about unused variables.
Suggested-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
Signed-off-by: Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
include/linux/of.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/linux/of.h b/include/linux/of.h
index 21e6323de0f3..2803a85e81ec 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -839,7 +839,11 @@ static inline void of_property_clear_flag(struct property *p, unsigned long flag
}
#define of_match_ptr(_ptr) NULL
-#define of_match_node(_matches, _node) NULL
+static inline const struct of_device_id *of_match_node(
+ const struct of_device_id *matches, const struct device_node *node)
+{
+ return NULL;
+}
#endif /* CONFIG_OF */
/* Default string compare functions, Allow arch asm/prom.h to override */
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread[parent not found: <20170406193224.10046-1-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] of: Make of_match_node() an inline stub for CONFIG_OF=n [not found] ` <20170406193224.10046-1-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2017-04-06 19:54 ` Andrew Lunn 2017-04-07 6:58 ` kbuild test robot 2017-04-07 7:49 ` kbuild test robot 2 siblings, 0 replies; 4+ messages in thread From: Andrew Lunn @ 2017-04-06 19:54 UTC (permalink / raw) To: Florian Fainelli Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, vivien.didelot-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/, Rob Herring, Frank Rowand, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE On Thu, Apr 06, 2017 at 12:32:24PM -0700, Florian Fainelli wrote: > Make of_match_node() an inline function when CONFIG_OF=n which allows the > compiler to eliminate warnings about unused variables. > > Suggested-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org> > Signed-off-by: Florian Fainelli <f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Thanks Florian, Reviewed-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org> Andrew -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] of: Make of_match_node() an inline stub for CONFIG_OF=n [not found] ` <20170406193224.10046-1-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2017-04-06 19:54 ` Andrew Lunn @ 2017-04-07 6:58 ` kbuild test robot 2017-04-07 7:49 ` kbuild test robot 2 siblings, 0 replies; 4+ messages in thread From: kbuild test robot @ 2017-04-07 6:58 UTC (permalink / raw) Cc: kbuild-all-JC7UmRfGjtg, linux-kernel-u79uwXL29TY76Z2rM5mHXA, andrew-g2DYL2Zd6BY, vivien.didelot-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/, Florian Fainelli, Rob Herring, Frank Rowand, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE [-- Attachment #1: Type: text/plain, Size: 3582 bytes --] Hi Florian, [auto build test ERROR on v4.9-rc8] [also build test ERROR on next-20170406] [cannot apply to glikely/devicetree/next] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Florian-Fainelli/of-Make-of_match_node-an-inline-stub-for-CONFIG_OF-n/20170407-111805 config: x86_64-acpi-redef (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/net/ethernet/cadence/macb.c: In function 'macb_probe': >> drivers/net/ethernet/cadence/macb.c:2967:25: error: 'macb_dt_ids' undeclared (first use in this function) match = of_match_node(macb_dt_ids, np); ^~~~~~~~~~~ drivers/net/ethernet/cadence/macb.c:2967:25: note: each undeclared identifier is reported only once for each function it appears in vim +/macb_dt_ids +2967 drivers/net/ethernet/cadence/macb.c 421d9df06 Cyrille Pitchen 2015-03-07 2951 struct phy_device *phydev; 421d9df06 Cyrille Pitchen 2015-03-07 2952 struct net_device *dev; 421d9df06 Cyrille Pitchen 2015-03-07 2953 struct resource *regs; 421d9df06 Cyrille Pitchen 2015-03-07 2954 void __iomem *mem; 421d9df06 Cyrille Pitchen 2015-03-07 2955 const char *mac; 421d9df06 Cyrille Pitchen 2015-03-07 2956 struct macb *bp; 421d9df06 Cyrille Pitchen 2015-03-07 2957 int err; 421d9df06 Cyrille Pitchen 2015-03-07 2958 f2ce8a9e4 Andy Shevchenko 2015-07-24 2959 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); f2ce8a9e4 Andy Shevchenko 2015-07-24 2960 mem = devm_ioremap_resource(&pdev->dev, regs); f2ce8a9e4 Andy Shevchenko 2015-07-24 2961 if (IS_ERR(mem)) f2ce8a9e4 Andy Shevchenko 2015-07-24 2962 return PTR_ERR(mem); f2ce8a9e4 Andy Shevchenko 2015-07-24 2963 c69618b3e Nicolas Ferre 2015-03-31 2964 if (np) { c69618b3e Nicolas Ferre 2015-03-31 2965 const struct of_device_id *match; c69618b3e Nicolas Ferre 2015-03-31 2966 c69618b3e Nicolas Ferre 2015-03-31 @2967 match = of_match_node(macb_dt_ids, np); c69618b3e Nicolas Ferre 2015-03-31 2968 if (match && match->data) { c69618b3e Nicolas Ferre 2015-03-31 2969 macb_config = match->data; c69618b3e Nicolas Ferre 2015-03-31 2970 clk_init = macb_config->clk_init; c69618b3e Nicolas Ferre 2015-03-31 2971 init = macb_config->init; c69618b3e Nicolas Ferre 2015-03-31 2972 } c69618b3e Nicolas Ferre 2015-03-31 2973 } c69618b3e Nicolas Ferre 2015-03-31 2974 aead88bd0 shubhrajyoti.datta-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org 2016-08-16 2975 err = clk_init(pdev, &pclk, &hclk, &tx_clk, &rx_clk); :::::: The code at line 2967 was first introduced by commit :::::: c69618b3e4f220f4990b91596d40ea3c4cdc938a net/macb: fix probe sequence to setup clocks earlier :::::: TO: Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org> :::::: CC: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 28725 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] of: Make of_match_node() an inline stub for CONFIG_OF=n [not found] ` <20170406193224.10046-1-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2017-04-06 19:54 ` Andrew Lunn 2017-04-07 6:58 ` kbuild test robot @ 2017-04-07 7:49 ` kbuild test robot 2 siblings, 0 replies; 4+ messages in thread From: kbuild test robot @ 2017-04-07 7:49 UTC (permalink / raw) Cc: kbuild-all-JC7UmRfGjtg, linux-kernel-u79uwXL29TY76Z2rM5mHXA, andrew-g2DYL2Zd6BY, vivien.didelot-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/, Florian Fainelli, Rob Herring, Frank Rowand, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE [-- Attachment #1: Type: text/plain, Size: 3183 bytes --] Hi Florian, [auto build test ERROR on v4.9-rc8] [also build test ERROR on next-20170406] [cannot apply to glikely/devicetree/next] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Florian-Fainelli/of-Make-of_match_node-an-inline-stub-for-CONFIG_OF-n/20170407-111805 config: x86_64-randconfig-ne0-04071359 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers//mfd/max8998.c: In function 'max8998_i2c_get_driver_data': >> drivers//mfd/max8998.c:174:25: error: 'max8998_dt_match' undeclared (first use in this function) match = of_match_node(max8998_dt_match, i2c->dev.of_node); ^~~~~~~~~~~~~~~~ drivers//mfd/max8998.c:174:25: note: each undeclared identifier is reported only once for each function it appears in vim +/max8998_dt_match +174 drivers//mfd/max8998.c ee999fb3 Tomasz Figa 2013-06-25 158 ee999fb3 Tomasz Figa 2013-06-25 159 pd->ono = irq_of_parse_and_map(dev->of_node, 1); ee999fb3 Tomasz Figa 2013-06-25 160 ee999fb3 Tomasz Figa 2013-06-25 161 /* ee999fb3 Tomasz Figa 2013-06-25 162 * ToDo: the 'wakeup' member in the platform data is more of a linux ee999fb3 Tomasz Figa 2013-06-25 163 * specfic information. Hence, there is no binding for that yet and ee999fb3 Tomasz Figa 2013-06-25 164 * not parsed here. ee999fb3 Tomasz Figa 2013-06-25 165 */ ee999fb3 Tomasz Figa 2013-06-25 166 return pd; ee999fb3 Tomasz Figa 2013-06-25 167 } ee999fb3 Tomasz Figa 2013-06-25 168 8bace2d5 Lee Jones 2014-02-03 169 static inline unsigned long max8998_i2c_get_driver_data(struct i2c_client *i2c, ee999fb3 Tomasz Figa 2013-06-25 170 const struct i2c_device_id *id) ee999fb3 Tomasz Figa 2013-06-25 171 { ee999fb3 Tomasz Figa 2013-06-25 172 if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) { ee999fb3 Tomasz Figa 2013-06-25 173 const struct of_device_id *match; ee999fb3 Tomasz Figa 2013-06-25 @174 match = of_match_node(max8998_dt_match, i2c->dev.of_node); 8bace2d5 Lee Jones 2014-02-03 175 return (unsigned long)match->data; ee999fb3 Tomasz Figa 2013-06-25 176 } ee999fb3 Tomasz Figa 2013-06-25 177 8bace2d5 Lee Jones 2014-02-03 178 return id->driver_data; ee999fb3 Tomasz Figa 2013-06-25 179 } ee999fb3 Tomasz Figa 2013-06-25 180 156f2528 Kyungmin Park 2010-06-16 181 static int max8998_i2c_probe(struct i2c_client *i2c, 156f2528 Kyungmin Park 2010-06-16 182 const struct i2c_device_id *id) :::::: The code at line 174 was first introduced by commit :::::: ee999fb3f17faa3af6028bf7130707fe0d4157a4 mfd: max8998: Add support for Device Tree :::::: TO: Tomasz Figa <t.figa-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> :::::: CC: Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 24388 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-07 7:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-06 19:32 [PATCH] of: Make of_match_node() an inline stub for CONFIG_OF=n Florian Fainelli
[not found] ` <20170406193224.10046-1-f.fainelli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-06 19:54 ` Andrew Lunn
2017-04-07 6:58 ` kbuild test robot
2017-04-07 7:49 ` kbuild test robot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox