Thread (14 messages) 14 messages, 5 authors, 5d ago

Re: [PATCH 0/6] Remove the error-injection.h include from linux/module.h

flat view

From: Petr Pavlu <petr.pavlu@suse.com>
Date: 2026-10-01 15:10:57
Also in: dri-devel, intel-gfx, intel-xe, linux-api, linux-block, lkml, netdev

On 9/11/26 5:04 PM, Petr Pavlu wrote:
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.

Add explicit includes of linux/error-injection.h to files that use the
ALLOW_ERROR_INJECTION() macro and currently rely on it being provided
indirectly via linux/module.h. Then remove the linux/error-injection.h
include from linux/module.h.

The first five patches can go through their respective trees if preferred.
The final patch depends on the preceding cleanups.
I've queued the series on modules-next for 7.4-rc1.

-- 
Thanks,
Petr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help