[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z7XPcYtaA4COHDYj@smile.fi.intel.com>
Date: Wed, 19 Feb 2025 14:32:49 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: Dipen Patel <dipenp@...dia.com>,
Linus Walleij <linus.walleij@...aro.org>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
timestamp@...ts.linux.dev,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH v4 1/2] gpiolib: move all includes to the top of
gpio/consumer.h
On Mon, Feb 17, 2025 at 11:39:21AM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
>
> We have several conditional includes depending on !CONFIG_GPIOLIB. This
> is supposed to reduce compilation time with CONFIG_GPIOLIB=y but in
> practice there's no difference on modern machines.
It's not about modern machines. If every maintainer will think this way,
we end up in the complete and utter dead end with the headers.
I believe you at least had read the cover letter for the infamous Ingo's series
about headers and how it speeds up the build (in some cases up to 70% on as you
said "modern machines").
> It makes adding new stubs that depend on more than just GPIOLIB harder so
> move them all to the top, unduplicate them and replace asm/ with preferred
> linux/ alternatives.
NAK.
This makes dependency hell things much worse and this is a step back on the
untangling the current situation along with the slowing down the speed of the
build. Please. consider to revert or discard this patch.
...
> #include <linux/bits.h>
> +#include <linux/bug.h>
Okay to replace, but not okay to move.
> #include <linux/err.h>
> +#include <linux/errno.h>
Please, double check that it uses error codes from it, otherwise err.h includes
asm/errno.h with basic codes already.
> +#include <linux/kernel.h>
This is definitely no. Please, read what's written in the top of that file and
here is just a proxy for should come in the future a kind of might_sleep.h.
Do not move this one at all, please.
> #include <linux/types.h>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists