Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5295989rwp; Mon, 17 Jul 2023 01:08:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlEgZykDqL2DrF+NzQM4ejgFprxYim7c/V0Tb+cG9TgsK2Zsg/MRXwHyDAfHjQYS60sWqhyq X-Received: by 2002:a05:6402:27c9:b0:51e:5898:a23d with SMTP id c9-20020a05640227c900b0051e5898a23dmr10870367ede.5.1689581318622; Mon, 17 Jul 2023 01:08:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689581318; cv=none; d=google.com; s=arc-20160816; b=wIaCEagTbXFquTglt3lSFZiWv/SQ4IFArvbI6QGztpSRkLt61t51yzmeUD7cv8e7l4 EymxgBKQelWf3MqR07nTzu/7llFqMgOmiWb5cfNMda+6v/H1mzpAY0b1rsFWAPLydUey Tr+9GNOaLalzfrpnQcTcejHgGUv86PfU7pJ6bv1aQJ219KpQz/ehYnJZ49M1vWXIwCgG w+b1Y5Pgfxo0TPgQ1aNx565sYlGSkAVDGdtMJUJZugzeyRrGLfhXTzg8PJWF/J/sCbgE bpjgaGVrXjyU/pgTkDiIT13Cbg5Y8y4SIK13ZkvNDUeb6lmIkl0bYrJJhy+N/17Hiiwf oFug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=TUpV0i69cnfkz2nelxENlLbeUDKFc0MGa24POWERkHA=; fh=FHMhn5G7s0ZtzFg1ePTwRBhFjpvyy7Q0E/0ohr563GQ=; b=xIaM1ix/vlsN0hJtrEDS+geUqwmJawD2uiudLDgX8+eIgwB4o8u9JVelhNN6Ez/oE+ EbVhH2RCNRDyPIwK5fYAT69Nr4c0Jg8pw1zPjc190PQ77aNtYM9XfAglpP8+9O3c3NpD DEltHGUFkw3MiKE6XqUID/wv/ndVTtz2eIf63dgoJBQgqSSd/PpB1I3RMtHJFaab3P2c k6gV+ssOraM+3ZLyhdpmWAZ+CM1vMlj/fuFQSTTxOq4JTdgezccFBafTCAdwX7kOOSKx Lv2oEfJEGTW7zt2HU9FVwGoOyCJz8//qxS8v+iuq0p/oIomJ7pt8FLPJJUgK2d6wToJ2 OQJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bc26-20020a056402205a00b0051e478c1926si13918387edb.234.2023.07.17.01.08.14; Mon, 17 Jul 2023 01:08:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230481AbjGQHpV (ORCPT + 99 others); Mon, 17 Jul 2023 03:45:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230095AbjGQHpS (ORCPT ); Mon, 17 Jul 2023 03:45:18 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9D181729 for ; Mon, 17 Jul 2023 00:44:43 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qLItl-0005e3-Cd; Mon, 17 Jul 2023 09:44:01 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1qLIte-0004Us-4z; Mon, 17 Jul 2023 09:43:54 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qLItd-005WwB-3s; Mon, 17 Jul 2023 09:43:53 +0200 Date: Mon, 17 Jul 2023 09:43:52 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Rob Herring Cc: Thierry Reding , Hector Martin , Sven Peter , Alyssa Rosenzweig , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Benson Leung , Guenter Roeck , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Paul Cercueil , Vladimir Zapolskiy , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Conor Dooley , Daire McNamara , Matthias Brugger , AngeloGioacchino Del Regno , Palmer Dabbelt , Paul Walmsley , Michael Walle , Orson Zhai , Baolin Wang , Chunyan Zhang , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Hammer Hsieh , Jonathan Hunter , Nobuhiro Iwamatsu , chrome-platform@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, linux-mips@vger.kernel.org, linux-mediatek@lists.infradead.org, asahi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-riscv@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] pwm: Explicitly include correct DT includes Message-ID: <20230717074352.dz3ex7fwi77loayc@pengutronix.de> References: <20230714174852.4062251-1-robh@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3pw4fff6xzsrv6pf" Content-Disposition: inline In-Reply-To: <20230714174852.4062251-1-robh@kernel.org> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --3pw4fff6xzsrv6pf Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 14, 2023 at 11:48:50AM -0600, Rob Herring wrote: > The DT of_device.h and of_platform.h date back to the separate > of_platform_bus_type before it as merged into the regular platform bus. > As part of that merge prepping Arm DT support 13 years ago, they > "temporarily" include each other. They also include platform_device.h > and of.h. As a result, there's a pretty much random mix of those include > files used throughout the tree. In order to detangle these headers and > replace the implicit includes with struct declarations, users need to > explicitly include the correct includes. so the eventual goal here is to prepare for: - drop #include from include/linux/of_platform.h - drop #include from include/linux/of_device.h - drop #include from include/linux/of_device.h - drop #include from include/linux/of_device.h - drop #include from include/linux/of_platform.h > Signed-off-by: Rob Herring > --- > drivers/pwm/core.c | 1 + > drivers/pwm/pwm-apple.c | 1 + > drivers/pwm/pwm-atmel-hlcdc.c | 1 + > drivers/pwm/pwm-atmel-tcb.c | 3 +-- > drivers/pwm/pwm-atmel.c | 1 - > drivers/pwm/pwm-berlin.c | 1 + > drivers/pwm/pwm-cros-ec.c | 1 + > drivers/pwm/pwm-fsl-ftm.c | 3 +-- > drivers/pwm/pwm-hibvt.c | 2 +- > drivers/pwm/pwm-imx1.c | 1 - > drivers/pwm/pwm-jz4740.c | 2 +- > drivers/pwm/pwm-lp3943.c | 1 + > drivers/pwm/pwm-lpc18xx-sct.c | 1 + > drivers/pwm/pwm-mediatek.c | 1 - > drivers/pwm/pwm-meson.c | 1 - > drivers/pwm/pwm-microchip-core.c | 2 +- > drivers/pwm/pwm-mtk-disp.c | 1 - > drivers/pwm/pwm-pxa.c | 1 + > drivers/pwm/pwm-sifive.c | 1 + > drivers/pwm/pwm-sl28cpld.c | 1 + > drivers/pwm/pwm-sprd.c | 1 + > drivers/pwm/pwm-sun4i.c | 1 - > drivers/pwm/pwm-sunplus.c | 1 + > drivers/pwm/pwm-tegra.c | 1 - > drivers/pwm/pwm-tiecap.c | 2 +- > drivers/pwm/pwm-tiehrpwm.c | 2 +- > drivers/pwm/pwm-visconti.c | 2 +- > drivers/pwm/pwm-vt8500.c | 5 +---- > 28 files changed, 21 insertions(+), 21 deletions(-) >=20 > diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c > index 3dacceaef4a9..d37617c60eae 100644 > --- a/drivers/pwm/core.c > +++ b/drivers/pwm/core.c > @@ -8,6 +8,7 @@ > =20 > #include > #include > +#include > #include > #include > #include This file includes neither of_device.h nor of_platform.h and up to now gets of.h via . What is your plan for 's include? I think it would only need struct of_phandle_args; to replace that. (But that would need another patch like this one, as then e.g. drivers/pwm/pwm-sl28cpld.c fails to compile because device_property_read_u32() is undeclared. It would need to #include which now it gets transitively via .) If is planed to continue #including , the explicit include here isn't necessary (and probably elsewhere). I don't care much either way, but maybe your quest would be a bit simpler if you only touch files that include the two files you want to modify? *shrug*, this patch is still an improvement so: Acked-by: Uwe Kleine-K=F6ng Another thing I wonder is: How did you identify the files that need these includes. I guess you have a list of types for each header and search for files that use any of the types but doesn't include the respecitve header? I wonder if tracking this type -> header mapping in machine readable form somewhere would be nice, to e.g. make checkpatch warn if a file uses struct of_node but only gets it by chance? Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --3pw4fff6xzsrv6pf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmS08TgACgkQj4D7WH0S /k6d7QgAjn09jbMtpLkxkAPiHCL/fUXRMWWMV76Fu8uZjs4221J2gsMK6PDWTeiP ybzv24/V+5/OyOeBVsFqZPw0gxNhTh8zmtyIdEvZO8eMBcZOX6JPcm/DI4YG3WU+ 6nYSRGc7D+AV+eD7s5CxHboHtOwY7RC2RGyPCNPA0yIYNTLYpdIVHYyn+8BpfeXj wnBKUiJAcJH7+JGUSFhRV7Xpd4RenRBnT3l8KEm9HUjJlEvqmNpueg64ho1bSXAH +fbd5TtrHh001xp2BdyJ57uhh+KQggrhgLPhOSiiBQ7+oaro/jiO4IxUODUDCTia LGNDfrMHQ1gjS2ZQQPQwRr0vdmwd2w== =DUiw -----END PGP SIGNATURE----- --3pw4fff6xzsrv6pf--