[OpenWrt-Devel] [PATCH] ar71xx: add missing include for checking kernel version

Koen Vandeputte koen.vandeputte at ncentric.com
Wed Aug 22 06:38:21 EDT 2018


Fixes these build errors:

arch/mips/ath79/mach-rb2011.c:20:5: error: "LINUX_VERSION_CODE" is not defined, evaluates to 0 [-Werror=undef]
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
     ^~~~~~~~~~~~~~~~~~
arch/mips/ath79/mach-rb2011.c:20:26: error: "KERNEL_VERSION" is not defined, evaluates to 0 [-Werror=undef]
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
                          ^~~~~~~~~~~~~~
arch/mips/ath79/mach-rb2011.c:20:40: error: missing binary operator before token "("
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
                                        ^
arch/mips/ath79/mach-rb2011.c:23:10: fatal error: linux/mtd/rawnand.h: No such file or directory
 #include <linux/mtd/rawnand.h>
          ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
compilation terminated.

Fixes: 318e19ba6755 ("ar71xx: add v4.14 support")

Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 target/linux/ar71xx/files/arch/mips/ath79/mach-c60.c             | 1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-domywifi-dw33d.c  | 1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c         | 1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-rb2011.c          | 1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c           | 1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-rb922.c           | 1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c           | 1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-rbsxtlite.c       | 1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-wndr4300.c        | 1 +
 .../files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ethtool.c   | 1 +
 10 files changed, 10 insertions(+)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-c60.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-c60.c
index f5b8d3065f64..bccf2e5873f8 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-c60.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-c60.c
@@ -12,6 +12,7 @@
  *  by the Free Software Foundation.
  */
 
+#include <linux/version.h>
 #include <linux/pci.h>
 #include <linux/phy.h>
 #include <linux/mtd/mtd.h>
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-domywifi-dw33d.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-domywifi-dw33d.c
index 4210646e2417..ac4aa8eadf04 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-domywifi-dw33d.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-domywifi-dw33d.c
@@ -18,6 +18,7 @@
  *
  */
 
+#include <linux/version.h>
 #include <linux/platform_device.h>
 #include <linux/ar8216_platform.h>
 #include <linux/mtd/mtd.h>
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c
index 3f5a404e6fa8..1c08e53f1552 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-nbg6716.c
@@ -20,6 +20,7 @@
  *
  */
 
+#include <linux/version.h>
 #include <linux/platform_device.h>
 #include <linux/ar8216_platform.h>
 #include <linux/gpio.h>
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb2011.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb2011.c
index 60c505b6dc41..7bf64905c68d 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb2011.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb2011.c
@@ -11,6 +11,7 @@
 
 #define pr_fmt(fmt) "rb2011: " fmt
 
+#include <linux/version.h>
 #include <linux/phy.h>
 #include <linux/delay.h>
 #include <linux/platform_device.h>
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c
index 985ef72d78c4..e240c3ad43cf 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c
@@ -10,6 +10,7 @@
 
 #define pr_fmt(fmt) "rb91x: " fmt
 
+#include <linux/version.h>
 #include <linux/phy.h>
 #include <linux/delay.h>
 #include <linux/platform_device.h>
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb922.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb922.c
index 10cbdd56b61a..43bcc99fc7cd 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb922.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb922.c
@@ -8,6 +8,7 @@
  *  by the Free Software Foundation.
  */
 
+#include <linux/version.h>
 #include <linux/phy.h>
 #include <linux/delay.h>
 #include <linux/platform_device.h>
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c
index adf23fa68bd4..33c4f531330f 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb95x.c
@@ -12,6 +12,7 @@
 
 #define pr_fmt(fmt) "rb95x: " fmt
 
+#include <linux/version.h>
 #include <linux/phy.h>
 #include <linux/delay.h>
 #include <linux/platform_device.h>
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbsxtlite.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbsxtlite.c
index 9f3f8ecd4731..d0e6baea49e8 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbsxtlite.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbsxtlite.c
@@ -12,6 +12,7 @@
 
 #define pr_fmt(fmt) "sxtlite: " fmt
 
+#include <linux/version.h>
 #include <linux/phy.h>
 #include <linux/delay.h>
 #include <linux/platform_device.h>
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wndr4300.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wndr4300.c
index a50239da15cd..d129bb7854ad 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wndr4300.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wndr4300.c
@@ -9,6 +9,7 @@
  *  by the Free Software Foundation.
  */
 
+#include <linux/version.h>
 #include <linux/pci.h>
 #include <linux/phy.h>
 #include <linux/gpio.h>
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ethtool.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ethtool.c
index a8fd5c7209fa..a2eaba1a1e68 100644
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ethtool.c
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ethtool.c
@@ -12,6 +12,7 @@
  */
 
 #include "ag71xx.h"
+#include <linux/version.h>
 
 static int ag71xx_ethtool_get_settings(struct net_device *dev,
 				       struct ethtool_cmd *cmd)
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list