Re: [PATCH -next] nvdimm: Remove duplicate linux/slab.h header

From: dan.j.williams

Date: Tue Sep 30 2025 - 15:34:25 EST


Alison Schofield wrote:
> On Mon, Sep 29, 2025 at 10:05:31AM -0500, Ira Weiny wrote:
> > Alison Schofield wrote:
> > > On Sun, Sep 28, 2025 at 09:31:10AM +0800, Jiapeng Chong wrote:
> > > > ./drivers/nvdimm/bus.c: linux/slab.h is included more than once.
> > >
> > > Hi Jiapeng,
> > >
> > > It would have been useful here to note where else slab.h was included,
> > > since it wasn't simply a duplicate #include in bus.c.
> >
> > Actually Alison this is a bug against linux-next where it was an issue
> > with Dave's patch here:
> >
> > https://lore.kernel.org/all/20250923174013.3319780-3-dave.jiang@xxxxxxxxx/
>
> Ah, I see this removes the dup that the above patch added.
>
> Why not remove fs.h instead of slab.h and get a clean up and de-dup
> in one shot?

fs.h is included for 'struct file_operations', so no clean up
opportunity there. Recall the "include what you use" recommendation:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submit-checklist.rst?id=v6.17-rc7#n17