mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
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 <atomlin@atomlin.com> Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
This commit is contained in:
parent
291a8fe5d9
commit
ff7360c5c7
|
|
@ -24,7 +24,6 @@
|
|||
#include <linux/jump_label.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/rbtree_latch.h>
|
||||
#include <linux/error-injection.h>
|
||||
#include <linux/tracepoint-defs.h>
|
||||
#include <linux/srcu.h>
|
||||
#include <linux/static_call_types.h>
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@
|
|||
#include <linux/codetag.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/execmem.h>
|
||||
#include <linux/error-injection.h>
|
||||
#include <uapi/linux/module.h>
|
||||
#include "internal.h"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user