Re: [PATCH v2 4/5] gpiolib: don't overwrite the entire flags field in gpiod_free_commit()
From: Andy Shevchenko
Date: Tue Nov 10 2026 - 05:18:59 EST
On Tue, Nov 10, 2026 at 09:54:11AM +0100, Bartosz Golaszewski wrote:
> On Mon, Nov 09, 2026 at 11:53:03PM +0200, Andy Shevchenko wrote:
> > On Mon, Nov 09, 2026 at 11:27:08AM +0100, Bartosz Golaszewski wrote:
...
> > > #include <linux/acpi.h>
> > > #include <linux/array_size.h>
> > > #include <linux/bitmap.h>
> > > +#include <linux/bitops.h>
> > > #include <linux/cleanup.h>
> > > #include <linux/compat.h>
> > > #include <linux/debugfs.h>
> >
> > No need, bitmap API implies all bitops.
>
> I honestly have no idea what the policy is on "proxy" headers. In some
> cases people advise against them, in others they say to include them.
>
> Is this documented anywhere?
No, but feel free to start such a documentation. In IIO we did a huge work
to enforce IWYU principle, and there we have some tribe knowledge about
the dependencies and guarantees. (Cc'ed some people.) In this case the
bitops.h inclusion is guaranteed by bitmap.h. If it stops doing like this
it will be a flag day.
--
With Best Regards,
Andy Shevchenko