From ff7360c5c731356a59171eef732a26a72381a8ba Mon Sep 17 00:00:00 2001 From: Petr Pavlu Date: Fri, 11 Sep 2026 17:04:06 +0200 Subject: module: Remove the error-injection.h include from linux/module.h linux/module.h appears in roughly 15k #include directives across the kernel. This makes it a "hot" header, so it should avoid pulling in unnecessary definitions. The header currently includes linux/error-injection.h to obtain the definition of `struct error_injection_entry`. However, this is unnecessary because the type is only referenced in the file as a pointer, for which an incomplete type is sufficient. Remove the linux/error-injection.h include from linux/module.h and add it to kernel/module/main.c instead, where `sizeof(struct error_injection_entry)` is actually needed. Reviewed-by: Aaron Tomlin Signed-off-by: Petr Pavlu --- include/linux/module.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/linux/module.h') diff --git a/include/linux/module.h b/include/linux/module.h index 96cc98568eea..b3a3d5827384 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3