]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2024 16:10:25 +0000 (18:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2024 16:10:25 +0000 (18:10 +0200)
added patches:
tools-move-alignment-related-macros-to-new-linux-align.h.patch

queue-5.4/series
queue-5.4/tools-move-alignment-related-macros-to-new-linux-align.h.patch [new file with mode: 0644]

index a5e604117f64bd61a25420f273870db97fc10ed9..bde882fb369a89dda6be8b53e63d812e0aa3f9c4 100644 (file)
@@ -105,3 +105,4 @@ mmc-dw_mmc-allow-biu-and-ciu-clocks-to-defer.patch
 alsa-timer-relax-start-tick-time-check-for-slave-timer-elements.patch
 bluetooth-hci_ldisc-check-hci_uart_proto_ready-flag-in-hciuartgetproto.patch
 input-mt-limit-max-slots.patch
+tools-move-alignment-related-macros-to-new-linux-align.h.patch
diff --git a/queue-5.4/tools-move-alignment-related-macros-to-new-linux-align.h.patch b/queue-5.4/tools-move-alignment-related-macros-to-new-linux-align.h.patch
new file mode 100644 (file)
index 0000000..da336b2
--- /dev/null
@@ -0,0 +1,51 @@
+From 10a04ff09bcc39e0044190ffe9f00f998f13647c Mon Sep 17 00:00:00 2001
+From: Alexander Lobakin <aleksander.lobakin@intel.com>
+Date: Wed, 27 Mar 2024 16:23:48 +0100
+Subject: tools: move alignment-related macros to new <linux/align.h>
+
+From: Alexander Lobakin <aleksander.lobakin@intel.com>
+
+commit 10a04ff09bcc39e0044190ffe9f00f998f13647c upstream.
+
+Currently, tools have *ALIGN*() macros scattered across the unrelated
+headers, as there are only 3 of them and they were added separately
+each time on an as-needed basis.
+Anyway, let's make it more consistent with the kernel headers and allow
+using those macros outside of the mentioned headers. Create
+<linux/align.h> inside the tools/ folder and include it where needed.
+
+Signed-off-by: Yury Norov <yury.norov@gmail.com>
+Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/include/linux/align.h  |   12 ++++++++++++
+ tools/include/linux/bitmap.h |    1 +
+ 2 files changed, 13 insertions(+)
+ create mode 100644 tools/include/linux/align.h
+
+--- /dev/null
++++ b/tools/include/linux/align.h
+@@ -0,0 +1,12 @@
++/* SPDX-License-Identifier: GPL-2.0-only */
++
++#ifndef _TOOLS_LINUX_ALIGN_H
++#define _TOOLS_LINUX_ALIGN_H
++
++#include <uapi/linux/const.h>
++
++#define ALIGN(x, a)           __ALIGN_KERNEL((x), (a))
++#define ALIGN_DOWN(x, a)      __ALIGN_KERNEL((x) - ((a) - 1), (a))
++#define IS_ALIGNED(x, a)      (((x) & ((typeof(x))(a) - 1)) == 0)
++
++#endif /* _TOOLS_LINUX_ALIGN_H */
+--- a/tools/include/linux/bitmap.h
++++ b/tools/include/linux/bitmap.h
+@@ -3,6 +3,7 @@
+ #define _PERF_BITOPS_H
+ #include <string.h>
++#include <linux/align.h>
+ #include <linux/bitops.h>
+ #include <stdlib.h>
+ #include <linux/kernel.h>