Re: [PATCH v2] gpiolib: use the required minimum set of headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 25 Feb 2025 12:44:21 +0200
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:

> On Tue, Feb 25, 2025 at 10:52:10AM +0100, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> > 
> > 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@xxxxxxxxx>
> 
> 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




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux