summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNathan Lynch <nathan.lynch@amd.com>2025-06-24 16:50:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-20 19:30:35 +0300
commit18dbc182a97ff1a2a4f65209df6408b12b9c25fb (patch)
tree038aa813c135787b301ad2995ad24940e9193899 /include/linux
parent6246776e35b893a5450402458c426d73d85263d9 (diff)
downloadlinux-18dbc182a97ff1a2a4f65209df6408b12b9c25fb.tar.xz
lib: packing: Include necessary headers
[ Upstream commit 8bd0af3154b2206ce19f8b1410339f7a2a56d0c3 ] packing.h uses ARRAY_SIZE(), BUILD_BUG_ON_MSG(), min(), max(), and sizeof_field() without including the headers where they are defined, potentially causing build failures. Fix this in packing.h and sort the result. Signed-off-by: Nathan Lynch <nathan.lynch@amd.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/20250624-packing-includes-v1-1-c23c81fab508@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/packing.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/packing.h b/include/linux/packing.h
index 8d6571feb95d..60117401c7ee 100644
--- a/include/linux/packing.h
+++ b/include/linux/packing.h
@@ -5,8 +5,12 @@
#ifndef _LINUX_PACKING_H
#define _LINUX_PACKING_H
-#include <linux/types.h>
+#include <linux/array_size.h>
#include <linux/bitops.h>
+#include <linux/build_bug.h>
+#include <linux/minmax.h>
+#include <linux/stddef.h>
+#include <linux/types.h>
#define QUIRK_MSB_ON_THE_RIGHT BIT(0)
#define QUIRK_LITTLE_ENDIAN BIT(1)