[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211007112328.GA19281@gondor.apana.org.au>
Date: Thu, 7 Oct 2021 19:23:28 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Randy Dunlap <rdunlap@...radead.org>,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
kunit-dev@...glegroups.com, linux-media@...r.kernel.org,
netdev@...r.kernel.org,
Brendan Higgins <brendanhiggins@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>,
Boqun Feng <boqun.feng@...il.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Thomas Graf <tgraf@...g.ch>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2 3/4] lib/rhashtable: Replace kernel.h with the
necessary inclusions
On Thu, Oct 07, 2021 at 12:51:28PM +0300, Andy Shevchenko wrote:
> When kernel.h is used in the headers it adds a lot into dependency hell,
> especially when there are circular dependencies are involved.
>
> Replace kernel.h inclusion with the list of what is really being used.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
> lib/rhashtable.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/lib/rhashtable.c b/lib/rhashtable.c
> index a422c7dd9126..01502cf77564 100644
> --- a/lib/rhashtable.c
> +++ b/lib/rhashtable.c
> @@ -12,9 +12,13 @@
> */
>
> #include <linux/atomic.h>
> +#include <linux/bit_spinlock.h>
> #include <linux/container_of.h>
> -#include <linux/kernel.h>
> +#include <linux/err.h>
> +#include <linux/export.h>
> #include <linux/init.h>
> +#include <linux/jhash.h>
> +#include <linux/lockdep.h>
> #include <linux/log2.h>
> #include <linux/sched.h>
> #include <linux/rculist.h>
Nack. I can see the benefits of splitting things out of kernel.h
but there is no reason to add crap to end users like rhashtable.c.
Thanks,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists