From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1C7CC433FE for ; Thu, 7 Oct 2021 17:47:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 95631610C7 for ; Thu, 7 Oct 2021 17:47:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242973AbhJGRtB (ORCPT ); Thu, 7 Oct 2021 13:49:01 -0400 Received: from smtprelay0057.hostedemail.com ([216.40.44.57]:50724 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S241071AbhJGRs7 (ORCPT ); Thu, 7 Oct 2021 13:48:59 -0400 Received: from omf13.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id AF308181D5AA8; Thu, 7 Oct 2021 17:47:04 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf13.hostedemail.com (Postfix) with ESMTPA id 3E9C91124F8; Thu, 7 Oct 2021 17:47:00 +0000 (UTC) Message-ID: <50e81a87af1f832ae8e135b15aa41a87c08400e0.camel@perches.com> Subject: Re: [PATCH v4 6/7] plist: Replace kernel.h with the necessary inclusions From: Joe Perches To: Andy Shevchenko Cc: Brendan Higgins , Peter Zijlstra , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-media@vger.kernel.org, Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Andrew Morton , Miguel Ojeda , jic23@kernel.org, linux@rasmusvillemoes.dk, Thorsten Leemhuis Date: Thu, 07 Oct 2021 10:46:59 -0700 In-Reply-To: References: <20211007154407.29746-1-andriy.shevchenko@linux.intel.com> <20211007154407.29746-7-andriy.shevchenko@linux.intel.com> <1ec405c5a8fd24de9066277ce855d7e39f93e691.camel@perches.com> <04ebb29ccb707bc37df2d3ddd684781114a1a62e.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.0-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspamout05 X-Rspamd-Queue-Id: 3E9C91124F8 X-Stat-Signature: js9xg1nie7rcba17bhx9wntqbj17r6mz X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19aRUm/4rtwwqaN+mIxySG7FIoWsloqmj0= X-HE-Tag: 1633628820-910685 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2021-10-07 at 20:32 +0300, Andy Shevchenko wrote: > On Thu, Oct 07, 2021 at 10:26:05AM -0700, Joe Perches wrote: > > On Thu, 2021-10-07 at 20:19 +0300, Andy Shevchenko wrote: > > > On Thu, Oct 07, 2021 at 10:12:56AM -0700, Joe Perches wrote: > > > > On Thu, 2021-10-07 at 18:44 +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. > > > > [] > > > > > diff --git a/include/linux/plist.h b/include/linux/plist.h > > > > [] > > > > > @@ -73,8 +73,11 @@ > > > > [] > > > > > +#include > > > > > > > > why asm/bug.h and not linux/bug.h ? > > > > > > The direct inclusion is from that one. Why linux/bug? > > > > A general guideline is to avoid asm includes. > > It's fine when it has any useful background. Doing cargo cult is not always > a good idea. I plead for common sense. Common sense isn't particularly common. Someone is going to run checkpatch on it and submit a patch one day. Maybe add a comment for the less common. cheers, Joe