Re: [PATCH v2] t10-pi: reduce ref tag code duplication

From: Caleb Sander Mateos

Date: Thu Apr 16 2026 - 11:38:30 EST


On Wed, Apr 15, 2026 at 10:18 PM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
>
> On Wed, Apr 15, 2026 at 03:08:47PM -0600, Caleb Sander Mateos wrote:
> > #ifndef _LINUX_T10_PI_H
> > #define _LINUX_T10_PI_H
> >
> > #include <linux/types.h>
> > #include <linux/blk-mq.h>
> > +#include <linux/wordpart.h>
>
> We must have already gotten this implicitly given that the code
> already uses lower_48_bits.

lower_48_bits() is defined (and only used) in this header. Yes,
wordpart.h is already transitively included by the other headers, but
I think it's good practice for each file to explicitly include the
headers defining all the items it uses. It reduces the risk that
refactoring the other header files in the future will result in a
compilation error here by dropping the transitive include.

Thanks,
Caleb