summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@infradead.org>2025-12-14 16:51:56 -0800
committerAndrew Morton <akpm@linux-foundation.org>2026-01-20 19:44:19 -0800
commit24c776355f4097316a763005434ffff716aa21a8 (patch)
tree86b46217929d6d4f06abba4a84343ad3afe6cbd6 /lib
parent6dcd539f062d89127cb3a84a7da373a9bd28ba7b (diff)
kernel.h: drop hex.h and update all hex.h users
Remove <linux/hex.h> from <linux/kernel.h> and update all users/callers of hex.h interfaces to directly #include <linux/hex.h> as part of the process of putting kernel.h on a diet. Removing hex.h from kernel.h means that 36K C source files don't have to pay the price of parsing hex.h for the roughly 120 C source files that need it. This change has been build-tested with allmodconfig on most ARCHes. Also, all users/callers of <linux/hex.h> in the entire source tree have been updated if needed (if not already #included). Link: https://lkml.kernel.org/r/20251215005206.2362276-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Yury Norov (NVIDIA) <yury.norov@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/hexdump.c1
-rw-r--r--lib/string_helpers.c1
-rw-r--r--lib/uuid.c1
-rw-r--r--lib/vsprintf.c1
4 files changed, 4 insertions, 0 deletions
diff --git a/lib/hexdump.c b/lib/hexdump.c
index c3db7c3a7643..2e5cd8c24769 100644
--- a/lib/hexdump.c
+++ b/lib/hexdump.c
@@ -6,6 +6,7 @@
#include <linux/types.h>
#include <linux/ctype.h>
#include <linux/errno.h>
+#include <linux/hex.h>
#include <linux/kernel.h>
#include <linux/minmax.h>
#include <linux/export.h>
diff --git a/lib/string_helpers.c b/lib/string_helpers.c
index ffb8ead6d4cd..8cb6f66c9c2b 100644
--- a/lib/string_helpers.c
+++ b/lib/string_helpers.c
@@ -13,6 +13,7 @@
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/fs.h>
+#include <linux/hex.h>
#include <linux/limits.h>
#include <linux/mm.h>
#include <linux/slab.h>
diff --git a/lib/uuid.c b/lib/uuid.c
index e309b4c5be3d..e8543c668dc7 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -10,6 +10,7 @@
#include <linux/ctype.h>
#include <linux/errno.h>
#include <linux/export.h>
+#include <linux/hex.h>
#include <linux/uuid.h>
#include <linux/random.h>
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index a3790c43a0ab..800b8ac49f53 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -26,6 +26,7 @@
#include <linux/types.h>
#include <linux/string.h>
#include <linux/ctype.h>
+#include <linux/hex.h>
#include <linux/kernel.h>
#include <linux/kallsyms.h>
#include <linux/math64.h>