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]
Date:   Thu, 23 Nov 2017 13:00:51 +0100
From:   Arend van Spriel <arend.vanspriel@...adcom.com>
To:     netdev@...r.kernel.org
Cc:     Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Subject: [PATCH] dsa: dsa2: fix compile error for !CONFIG_OF

Compilation fails building on x86_64 platform which does not
have CONFIG_OF enabled.

Signed-off-by: Arend van Spriel <arend.vanspriel@...adcom.com>
---
After rebasing my branch to v4.14 I attempted to build the kernel and 
hit the following compile issue:

net/dsa/dsa2.c: In function \u2018dsa_switch_parse_member_of\u2019:
net/dsa/dsa2.c:678:2: error: implicit declaration of function 
'of_property_read_variable_u32_array' 
[-Werror=implicit-function-declaration]
   sz = of_property_read_variable_u32_array(dn, "dsa,member", m, 2, 2);
   ^
cc1: some warnings being treated as errors
make[4]: *** [net/dsa/dsa2.o] Error 1

Basically I do not have CONFIG_OF set and the function above is not 
stubbed for !CONFIG_OF. Attached is my v4.14 config.
---
  net/dsa/dsa2.c | 7 +++++++
  1 file changed, 7 insertions(+)

diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index 283104e..5e15fc2 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -612,6 +612,7 @@ static int dsa_dst_parse(struct dsa_switch_tree *dst)
  	return 0;
  }

+#ifdef CONFIG_OF
  static int dsa_port_parse_of(struct dsa_port *dp, struct device_node *dn)
  {
  	struct device_node *ethernet = of_parse_phandle(dn, "ethernet", 0);
@@ -700,6 +701,12 @@ static int dsa_switch_parse_of(struct dsa_switch 
*ds, struct device_node *dn)

  	return dsa_switch_parse_ports_of(ds, dn);
  }
+#else
+static int dsa_switch_parse_of(struct dsa_switch *ds, struct 
device_node *dn)
+{
+	return 0;
+}
+#endif /* CONFIG_OF */

  static int dsa_port_parse(struct dsa_port *dp, const char *name,
  			  struct device *dev)

View attachment "config-4.14" of type "text/plain" (125818 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ