From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: [PATCH] of: Make of_match_node() an inline stub for CONFIG_OF=n Date: Thu, 6 Apr 2017 12:32:24 -0700 Message-ID: <20170406193224.10046-1-f.fainelli@gmail.com> Return-path: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: andrew-g2DYL2Zd6BY@public.gmane.org, vivien.didelot-4ysUXcep3aM1wj+D4I0NRVaTQe2KTcn/@public.gmane.org, Florian Fainelli , Rob Herring , Frank Rowand , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" List-Id: devicetree@vger.kernel.org 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 Signed-off-by: Florian Fainelli --- 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