Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1618305
| From | Florian Fainelli <f.fainelli@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] of: Make of_match_node() an inline stub for CONFIG_OF=n |
| Date | 2017-04-06 21:40 +0200 |
| Message-ID | <ttlqa-58h-13@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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@lunn.ch>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] of: Make of_match_node() an inline stub for CONFIG_OF=n Florian Fainelli <f.fainelli@gmail.com> - 2017-04-06 21:40 +0200 Re: [PATCH] of: Make of_match_node() an inline stub for CONFIG_OF=n Andrew Lunn <andrew@lunn.ch> - 2017-04-06 22:00 +0200 Re: [PATCH] of: Make of_match_node() an inline stub for CONFIG_OF=n kbuild test robot <lkp@intel.com> - 2017-04-07 10:00 +0200
csiph-web