lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170825165644.30800-1-Eugeniy.Paltsev@synopsys.com>
Date:   Fri, 25 Aug 2017 19:56:44 +0300
From:   Eugeniy Paltsev <Eugeniy.Paltsev@...opsys.com>
To:     devicetree@...r.kernel.org
Cc:     linux-snps-arc@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Rob Herring <robh+dt@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Eugeniy Paltsev <Eugeniy.Paltsev@...opsys.com>
Subject: [PATCH v2] OF: move extern declarations of of_stdout inside ifdef

Move extern declarations of "of_stdout" pointer inside "CONFIG_OF"
ifdef to be able to get rid of "CONFIG_OF" ifdef in its usage places.

Suggested-by: Steven Rostedt <rostedt@...dmis.org>

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@...opsys.com>
---
For example see: https://lkml.org/lkml/2017/8/25/337

Changes v1->v2:
 * Move only "of_stdout" declarations instead of all entry pointers
   declarations

 include/linux/of.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/linux/of.h b/include/linux/of.h
index cfc3411..be28cb9 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -135,7 +135,6 @@ static inline void of_node_put(struct device_node *node) { }
 extern struct device_node *of_root;
 extern struct device_node *of_chosen;
 extern struct device_node *of_aliases;
-extern struct device_node *of_stdout;
 extern raw_spinlock_t devtree_lock;
 
 /* flag descriptions (need to be visible even when !CONFIG_OF) */
@@ -147,6 +146,8 @@ extern raw_spinlock_t devtree_lock;
 #define OF_BAD_ADDR	((u64)-1)
 
 #ifdef CONFIG_OF
+extern struct device_node *of_stdout;
+
 void of_core_init(void);
 
 static inline bool is_of_node(const struct fwnode_handle *fwnode)
@@ -539,6 +540,7 @@ const char *of_prop_next_string(struct property *prop, const char *cur);
 bool of_console_check(struct device_node *dn, char *name, int index);
 
 #else /* CONFIG_OF */
+#define of_stdout	NULL
 
 static inline void of_core_init(void)
 {
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ