[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250226214613.1e814f9a@pumpkin>
Date: Wed, 26 Feb 2025 21:46:13 +0000
From: David Laight <david.laight.linux@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: Bartosz Golaszewski <brgl@...ev.pl>, Linus Walleij
<linus.walleij@...aro.org>, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org, Bartosz Golaszewski
<bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH v2] gpiolib: use the required minimum set of headers
On Tue, 25 Feb 2025 12:44:21 +0200
Andy Shevchenko <andriy.shevchenko@...el.com> wrote:
> On Tue, Feb 25, 2025 at 10:52:10AM +0100, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> >
> > Andy suggested we should keep a fine-grained scheme for includes and
> > only pull in stuff required within individual ifdef sections. Let's
> > revert commit dea69f2d1cc8 ("gpiolib: move all includes to the top of
> > gpio/consumer.h") and make the headers situation even more fine-grained
> > by only including the first level headers containing requireded symbols
> > except for bug.h where checkpatch.pl warns against including asm/bug.h.
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@...el.com>
>
> FWIW, I have checked the current state of affairs of linux/bug.h vs. asm/bug.h
> and found no possible issues with the dependencies. While linux/bug.h drags
> more than needed into this header it won't prevent cleaning up the rest of
> the headers. So for now we can stick with linux/bug.h, but at some point it
> would be better to be more pedantic on this.
>
A 'fun' activity is to pick a random file add "#define _IOW xxx" at the
top and see where ioctl.h is is first included from.
(I've not got a build machine up at the moment.)
Then start fixing that include sequence.
Moving a few headers around is otherwise pretty pointless.
David
Powered by blists - more mailing lists