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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEEADC4332F for ; Tue, 11 Oct 2022 08:52:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229697AbiJKIwh convert rfc822-to-8bit (ORCPT ); Tue, 11 Oct 2022 04:52:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbiJKIwg (ORCPT ); Tue, 11 Oct 2022 04:52:36 -0400 Received: from mail-oo1-f53.google.com (mail-oo1-f53.google.com [209.85.161.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 446275F116; Tue, 11 Oct 2022 01:52:35 -0700 (PDT) Received: by mail-oo1-f53.google.com with SMTP id r11-20020a4aa2cb000000b004806f49e27eso3501386ool.7; Tue, 11 Oct 2022 01:52:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RG7je/SPkrUeGbyJflxBun3+ZBOYqWehWXWhY9Ywba0=; b=iD1ZS6OfBtk8sON3hsIjwM5uucYcNqhbUYzlsYWMSN052gwEQU+g6IX2cu1rCA4rki LdnfXQvS4Yuh1Dwm8d5fJEHs7cg0LSIH2DWCskY+Al4sUQ23r+Lgx0Qjv+kOIuNkOzj+ 0Xeie9z6ihm46L/7IbyjfD+zA+7Ggr3UaZ2HzPrz1Z6T4QJ6Ok2oLbMLF56vQUphH2Z3 d8fjvst2WC2aluZOCwPT2pau2VT2e74QTP7iJGRAzAkUg5Ixkzsbq9V/0tSEHI1ldlol zLm6izgcvgSyQ36sBjutweV8fpbPZr7KIQeKK616rJ+/Sh7MVS32wYWuqI6rMqa8bdsd zlUg== X-Gm-Message-State: ACrzQf2vS9fHJMJukozh8wJPvRG0sGt89aBIKH0qW5Ko1fmMeFkB6ERy L8qNGH5DQQJw5sCTYjvqmiFBA8ZrksGds8eJ X-Google-Smtp-Source: AMsMyM7J2caHP7QYUnJnqsFi15536ODGqoMlJSTPiNnqPM9M5dbTNI6xrKViv6uj1K5PJJ/YxCzhGw== X-Received: by 2002:a4a:dbcd:0:b0:47f:9f26:3569 with SMTP id t13-20020a4adbcd000000b0047f9f263569mr8747611oou.19.1665478354431; Tue, 11 Oct 2022 01:52:34 -0700 (PDT) Received: from mail-oo1-f52.google.com (mail-oo1-f52.google.com. [209.85.161.52]) by smtp.gmail.com with ESMTPSA id r21-20020a056870439500b0012796e8033dsm6199722oah.57.2022.10.11.01.52.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Oct 2022 01:52:34 -0700 (PDT) Received: by mail-oo1-f52.google.com with SMTP id s125-20020a4a5183000000b0047fbaf2fcbcso7454574ooa.11; Tue, 11 Oct 2022 01:52:34 -0700 (PDT) X-Received: by 2002:a0d:de43:0:b0:349:31bd:e8d5 with SMTP id h64-20020a0dde43000000b0034931bde8d5mr20151543ywe.283.1665478004869; Tue, 11 Oct 2022 01:46:44 -0700 (PDT) MIME-Version: 1.0 References: <20221010201453.77401-1-andriy.shevchenko@linux.intel.com> <20221010201453.77401-37-andriy.shevchenko@linux.intel.com> In-Reply-To: From: Geert Uytterhoeven Date: Tue, 11 Oct 2022 10:46:30 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 36/36] pinctrl: Clean up headers To: Basavaraj Natikar Cc: Andy Shevchenko , Marc Zyngier , Bartosz Golaszewski , Kent Gibson , Mauro Carvalho Chehab , Billy Tsai , Thomas Gleixner , Linus Walleij , Mika Westerberg , AngeloGioacchino Del Regno , Chen-Yu Tsai , Claudiu Beznea , Samuel Holland , Horatiu Vultur , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Bjorn Andersson , Dmitry Baryshkov , Geert Uytterhoeven , Lad Prabhakar , Phil Edworthy , Krzysztof Kozlowski , Fabien Dessenne , Prathamesh Shete , Basavaraj Natikar , linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-actions@lists.infradead.org, linux-aspeed@lists.ozlabs.org, openbmc@lists.ozlabs.org, linux-rpi-kernel@lists.infradead.org, alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-mediatek@lists.infradead.org, linux-mips@vger.kernel.org, linux-riscv@lists.infradead.org, linux-omap@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Thierry Reding , Jonathan Hunter , Patrice Chotard , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Manivannan Sadhasivam , Andrew Jeffery , Joel Stanley , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Charles Keepax , Richard Fitzgerald , Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Sascha Hauer , NXP Linux Team , Andy Shevchenko , Sean Wang , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Ludovic Desroches , Nicolas Ferre , Alexandre Belloni , Chen-Yu Tsai , Paul Cercueil , Damien Le Moal , Tony Lindgren , Haojian Zhuang , Maxime Coquelin , Alexandre Torgue , Michal Simek , Andy Gross , Konrad Dybcio , Tomasz Figa , Sylwester Nawrocki , Alim Akhtar , Viresh Kumar , Shiraz Hashim , soc@kernel.org, Orson Zhai , Baolin Wang , Chunyan Zhang , Emil Renner Berthing , Kunihiko Hayashi , Masami Hiramatsu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Tue, Oct 11, 2022 at 9:31 AM Basavaraj Natikar wrote: > On 10/11/2022 1:44 AM, Andy Shevchenko wrote: > > There is a few things done: > > - include only the headers we are direct user of > > - when pointer is in use, provide a forward declaration > > - add missed headers > > - group generic headers and subsystem headers > > - sort each group alphabetically > > > > While at it, fix some awkward indentations. > > > > Signed-off-by: Andy Shevchenko > > --- > > drivers/pinctrl/core.c | 19 ++++++++------- > > drivers/pinctrl/core.h | 12 +++++++++- > > drivers/pinctrl/devicetree.h | 6 +++++ > > drivers/pinctrl/pinconf.h | 10 ++++++++ > > drivers/pinctrl/pinctrl-utils.h | 5 ++++ > > drivers/pinctrl/pinmux.c | 17 ++++++++------ > > drivers/pinctrl/pinmux.h | 11 +++++++++ > > include/linux/pinctrl/consumer.h | 31 +++++++++++-------------- > > include/linux/pinctrl/devinfo.h | 6 +++-- > > include/linux/pinctrl/machine.h | 8 ++++--- > > include/linux/pinctrl/pinconf-generic.h | 23 ++++++++++-------- > > include/linux/pinctrl/pinctrl.h | 18 +++++++------- > > include/linux/pinctrl/pinmux.h | 5 ++-- > > 13 files changed, 110 insertions(+), 61 deletions(-) > > > > diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c > > index 9e57f4c62e60..655f9502e73f 100644 > > --- a/drivers/pinctrl/core.c > > +++ b/drivers/pinctrl/core.c > > @@ -12,19 +12,21 @@ > > */ > > #define pr_fmt(fmt) "pinctrl core: " fmt > > > > -#include > > -#include > > -#include > > -#include > > +#include > > #include > > -#include > > #include > > +#include > > +#include > > +#include > > +#include > > #include > > -#include > > #include > > +#include > > + > > #include > > -#include > > +#include > > #include > > +#include > > > > #ifdef CONFIG_GPIOLIB > > #include "../gpio/gpiolib.h" > > @@ -33,9 +35,8 @@ > > > > #include "core.h" > > #include "devicetree.h" > > -#include "pinmux.h" > > #include "pinconf.h" > > - > > +#include "pinmux.h" > > > > static bool pinctrl_dummy_state; > > > > diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h > > index 840103c40c14..4d0bdb9fb99b 100644 > > --- a/drivers/pinctrl/core.h > > +++ b/drivers/pinctrl/core.h > > @@ -9,12 +9,22 @@ > > */ > > > > #include > > +#include > > #include > > #include > > -#include > > Removing pinconf.h from the core.h may cause build failure in other files > because where-ever core.h is included to use “struct pinconf_ops”, there > is a need to include pinconf.h. I can confirm adding #include to drivers/pinctrl/renesas/pinctrl-rzn1.c and drivers/pinctrl/pinctrl-single.c fixes the issues I was seeing with shmobile_defconfig and (out-of-tree) renesas_defconfig. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds