* [PATCH 1/2] batman-adv: compat: Add support for linux/kstrtox.h
@ 2021-07-23 17:23 Sven Eckelmann
2021-07-23 17:23 ` [PATCH 2/2] batman-adv: Switch to kstrtox.h for kstrtou64 Sven Eckelmann
0 siblings, 1 reply; 2+ messages in thread
From: Sven Eckelmann @ 2021-07-23 17:23 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Sven Eckelmann
The commit 4c52729377ea ("kernel.h: split out kstrtox() and simple_strtox()
to a separate header") moved the kstrtou64 function to a new header called
linux/kstrtox.h.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
compat-include/linux/kstrtox.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 compat-include/linux/kstrtox.h
diff --git a/compat-include/linux/kstrtox.h b/compat-include/linux/kstrtox.h
new file mode 100644
index 00000000..cd152e4b
--- /dev/null
+++ b/compat-include/linux/kstrtox.h
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/* Copyright (C) B.A.T.M.A.N. contributors:
+ *
+ * Marek Lindner, Simon Wunderlich
+ *
+ * This file contains macros for maintaining compatibility with older versions
+ * of the Linux kernel.
+ */
+
+#ifndef _NET_BATMAN_ADV_COMPAT_LINUX_KSTRTOX_H_
+#define _NET_BATMAN_ADV_COMPAT_LINUX_KSTRTOX_H_
+
+#include <linux/version.h>
+#if LINUX_VERSION_IS_GEQ(5, 14, 0)
+#include_next <linux/kstrtox.h>
+#else
+#include <linux/kernel.h>
+#endif
+
+#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_KSTRTOX_H_ */
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] batman-adv: Switch to kstrtox.h for kstrtou64
2021-07-23 17:23 [PATCH 1/2] batman-adv: compat: Add support for linux/kstrtox.h Sven Eckelmann
@ 2021-07-23 17:23 ` Sven Eckelmann
0 siblings, 0 replies; 2+ messages in thread
From: Sven Eckelmann @ 2021-07-23 17:23 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Sven Eckelmann
The commit 4c52729377ea ("kernel.h: split out kstrtox() and simple_strtox()
to a separate header") moved the kstrtou64 function to a new header called
linux/kstrtox.h.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
net/batman-adv/gateway_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/gateway_common.c b/net/batman-adv/gateway_common.c
index fdde305a..9349c76f 100644
--- a/net/batman-adv/gateway_common.c
+++ b/net/batman-adv/gateway_common.c
@@ -10,7 +10,7 @@
#include <linux/atomic.h>
#include <linux/byteorder/generic.h>
#include <linux/errno.h>
-#include <linux/kernel.h>
+#include <linux/kstrtox.h>
#include <linux/limits.h>
#include <linux/math64.h>
#include <linux/netdevice.h>
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-23 17:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23 17:23 [PATCH 1/2] batman-adv: compat: Add support for linux/kstrtox.h Sven Eckelmann
2021-07-23 17:23 ` [PATCH 2/2] batman-adv: Switch to kstrtox.h for kstrtou64 Sven Eckelmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.