[PATCH] ipe: remove headers that are included but not used

Fan Wu wufan at kernel.org
Mon Dec 8 19:02:25 UTC 2025


On Sat, Dec 6, 2025 at 1:04 PM Yicong Hui <yiconghui at gmail.com> wrote:
>
> On 12/3/25 10:25 PM, Fan Wu wrote:
> > On Wed, Dec 3, 2025 at 11:37 AM Yicong Hui <yiconghui at gmail.com> wrote:
> >
> > Hi Yicong,
> >
> > Thanks for the patch. This kind of cleanup is appreciated.
> >
> > Commit message typo: "audit. c, audit.c, policy. c" - audit. c is listed
> > twice.
>
> Hi! Thank you for the reply! Yes! My bad, this typo will be fixed in v2.
>
...
>
> I have manually read through the functions/macros/filetypes in policy.c,
> policy_fs.c and audit.c and found a few dependencies that are used but
> not explicitly included, like minmax.h, sha2.h, lockdep.h, string.h,
> capability.h, kstrtox.h, sprintf.h, array_size.h and err.h.
>
> This might be a stupid question, but how explicit should I be in my v2
> patch with the dependencies? There's headers like
> "asm-generic/int-ll64.h" "uidgid.h", "gfp_types.h", "rwonce.h",
> "compiler_types.h" or "errno-base.h" but I'm not sure to what extent I
> need to import them, because I shouldn't be including them all, right?

Hi Yicong,

On second thought, the cost of this cleanup outweighs the benefit.

Let's drop this patch and keep the code as it is.

-Fan



More information about the Linux-security-module-archive mailing list