|
@@ -0,0 +1,74 @@
|
|
|
|
+From 3b434d5878131cd45aa5c4dd906fe0e569b445d6 Mon Sep 17 00:00:00 2001
|
|
|
|
+From: Al Viro <viro@zeniv.linux.org.uk>
|
|
|
|
+Date: Tue, 1 Oct 2024 15:35:57 -0400
|
|
|
|
+Subject: [PATCH] batman-adv: move asm/unaligned.h to linux/unaligned.h
|
|
|
|
+
|
|
|
|
+asm/unaligned.h is always an include of asm-generic/unaligned.h;
|
|
|
|
+might as well move that thing to linux/unaligned.h and include
|
|
|
|
+that - there's nothing arch-specific in that header.
|
|
|
|
+
|
|
|
|
+auto-generated by the following:
|
|
|
|
+
|
|
|
|
+for i in `git grep -l -w asm/unaligned.h`; do
|
|
|
|
+ sed -i -e "s/asm\/unaligned.h/linux\/unaligned.h/" $i
|
|
|
|
+done
|
|
|
|
+for i in `git grep -l -w asm-generic/unaligned.h`; do
|
|
|
|
+ sed -i -e "s/asm-generic\/unaligned.h/linux\/unaligned.h/" $i
|
|
|
|
+done
|
|
|
|
+git mv include/asm-generic/unaligned.h include/linux/unaligned.h
|
|
|
|
+git mv tools/include/asm-generic/unaligned.h tools/include/linux/unaligned.h
|
|
|
|
+sed -i -e "/unaligned.h/d" include/asm-generic/Kbuild
|
|
|
|
+sed -i -e "s/__ASM_GENERIC/__LINUX/" include/linux/unaligned.h tools/include/linux/unaligned.h
|
|
|
|
+
|
|
|
|
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
|
|
|
|
+Signed-off-by: Sven Eckelmann <sven@narfation.org>
|
|
|
|
+Upstream: https://git.open-mesh.org/batman-adv.git/commit/ee60832ebec47a023d634b06f9434103ec090aed
|
|
|
|
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
|
|
|
+---
|
|
|
|
+ compat-include/linux/unaligned.h | 20 ++++++++++++++++++++
|
|
|
|
+ net/batman-adv/distributed-arp-table.c | 2 +-
|
|
|
|
+ 2 files changed, 21 insertions(+), 1 deletion(-)
|
|
|
|
+ create mode 100644 compat-include/linux/unaligned.h
|
|
|
|
+
|
|
|
|
+diff --git a/compat-include/linux/unaligned.h b/compat-include/linux/unaligned.h
|
|
|
|
+new file mode 100644
|
|
|
|
+index 00000000..66d86646
|
|
|
|
+--- /dev/null
|
|
|
|
++++ b/compat-include/linux/unaligned.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_UNALIGNED_H_
|
|
|
|
++#define _NET_BATMAN_ADV_COMPAT_LINUX_UNALIGNED_H_
|
|
|
|
++
|
|
|
|
++#include <linux/version.h>
|
|
|
|
++#if LINUX_VERSION_IS_GEQ(6, 12, 0)
|
|
|
|
++#include_next <linux/unaligned.h>
|
|
|
|
++#else
|
|
|
|
++#include <asm/unaligned.h>
|
|
|
|
++#endif
|
|
|
|
++
|
|
|
|
++#endif /* _NET_BATMAN_ADV_COMPAT_LINUX_UNALIGNED_H_ */
|
|
|
|
+diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c
|
|
|
|
+index 4c7e8553..801eff8a 100644
|
|
|
|
+--- a/net/batman-adv/distributed-arp-table.c
|
|
|
|
++++ b/net/batman-adv/distributed-arp-table.c
|
|
|
|
+@@ -7,7 +7,7 @@
|
|
|
|
+ #include "distributed-arp-table.h"
|
|
|
|
+ #include "main.h"
|
|
|
|
+
|
|
|
|
+-#include <asm/unaligned.h>
|
|
|
|
++#include <linux/unaligned.h>
|
|
|
|
+ #include <linux/atomic.h>
|
|
|
|
+ #include <linux/bitops.h>
|
|
|
|
+ #include <linux/byteorder/generic.h>
|
|
|
|
+--
|
|
|
|
+2.47.1
|
|
|
|
+
|