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