From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [85.220.165.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BF1F3FFE for ; Wed, 12 Jul 2023 11:04:02 +0000 (UTC) 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 1qJXcX-0006Kb-FX; Wed, 12 Jul 2023 13:02:57 +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 1qJXcU-00Drn9-6o; Wed, 12 Jul 2023 13:02:54 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1qJXcT-004ID3-Dy; Wed, 12 Jul 2023 13:02:53 +0200 Date: Wed, 12 Jul 2023 13:02:53 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Christian =?utf-8?B?S8O2bmln?= Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Alex Deucher , "Pan, Xinhui" , Harry Wentland , Leo Li , Rodrigo Siqueira , Hamza Mahfooz , Javier Martinez Canillas , Guchun Chen , Srinivasan Shanmugam , Evan Quan , Likun Gao , Marek =?utf-8?B?T2zFocOhaw==?= , David Francis , Hawking Zhang , Lang Yu , Philip Yang , Yifan Zhang , Tim Huang , Zack Rusin , Sam Ravnborg , Jani Nikula , Laurent Pinchart , =?utf-8?B?TWHDrXJh?= Canal , =?utf-8?B?QW5kcsOp?= Almeida , Qingqing Zhuo , Aurabindo Pillai , Hersen Wu , Fangzhi Zuo , Stylon Wang , Alan Liu , Wayne Lin , Aaron Liu , Melissa Wen , Bhawanpreet Lakha , David Tadokoro , Wenjing Liu , Jiapeng Chong , Mario Limonciello , Alexey Kodanev , Roman Li , =?utf-8?Q?Joaqu=C3=ADn_Ignacio_Aramend=C3=ADa?= , Dave Airlie , Russell King , Liviu Dudau , Joel Stanley , Boris Brezillon , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Inki Dae , Seung-Woo Kim , Kyungmin Park , Krzysztof Kozlowski , Stefan Agner , Alison Wang , Patrik Jakobsson , Noralf =?utf-8?Q?Tr=C3=B8nnes?= , Xinliang Liu , Tian Tao , Danilo Krummrich , Deepak Rawat , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , Ville =?utf-8?B?U3lyasOkbMOk?= , Lucas De Marchi , Ankit Nautiyal , Andrzej Hajda , Matt Roper , Stanislav Lisovskiy , Radhakrishna Sripada , Hans de Goede , Luca Coelho , Niranjana Vishwanathapura , Kai Vehmanen , Vinod Govindapillai , =?utf-8?Q?=C5=81ukasz?= Bartosik , Anusha Srivatsa , Chaitanya Kumar Borah , Uma Shankar , Imre Deak , Mitul Golani , Swati Sharma , Jouni =?utf-8?B?SMO2Z2FuZGVy?= , Mika Kahola , =?utf-8?B?Sm9zw6k=?= Roberto de Souza , Arun R Murthy , Gustavo Sousa , Khaled Almahallawy , Juha-Pekka Heikkila , Andi Shyti , Nirmoy Das , Fei Yang , Animesh Manna , Deepak R Varma , "Jiri Slaby (SUSE)" , Dmitry Baryshkov , Vandita Kulkarni , Suraj Kandpal , Drew Davenport , Laurentiu Palcu , Shawn Guo , Sascha Hauer , Philipp Zabel , Dan Carpenter , Paul Cercueil , Anitha Chrisanthus , Paul Kocialkowski , Linus Walleij , Chun-Kuang Hu , Matthias Brugger , Neil Armstrong , Kevin Hilman , Rob Clark , Abhinav Kumar , Vinod Polimera , Jiasheng Jiang , Konrad Dybcio , Jessica Zhang , Liu Shixin , Marek Vasut , Ben Skeggs , Karol Herbst , Lyude Paul , Tomi Valkeinen , Emma Anholt , Gerd Hoffmann , Kieran Bingham , Tomi Valkeinen , Wolfram Sang , Geert Uytterhoeven , Biju Das , Sandy Huang , Heiko =?utf-8?Q?St=C3=BCbner?= , Orson Zhai , Baolin Wang , Chunyan Zhang , Alain Volmat , Yannick Fertre , Raphael Gallais-Pou , Philippe Cornu , Maxime Coquelin , Alexandre Torgue , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thierry Reding , Mikko Perttunen , Jonathan Hunter , Jyri Sarha , David Lechner , Kamlesh Gurudasani , Rodrigo Siqueira , Melissa Wen , Oleksandr Andrushchenko , Michal Simek , Haneen Mohammed , linux-hyperv@vger.kernel.org, linux-aspeed@lists.ozlabs.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, Yongqin Liu , Alim Akhtar , Marijn Suijten , Fabio Estevam , Sumit Semwal , Jerome Brunet , linux-samsung-soc@vger.kernel.org, amd-gfx@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-rockchip@lists.infradead.org, Xinwei Kong , VMware Graphics Reviewers , NXP Linux Team , spice-devel@lists.freedesktop.org, linux-sunxi@lists.linux.dev, Martin Blumenstingl , linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-mediatek@lists.infradead.org, xen-devel@lists.xenproject.org, linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, Gurchetan Singh , Sean Paul , linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno , Andrew Jeffery , linux-mips@vger.kernel.org, Chia-I Wu , linux-renesas-soc@vger.kernel.org, kernel@pengutronix.de, John Stultz , freedreno@lists.freedesktop.org, Lucas Stach , Julia Lawall Subject: Re: [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev Message-ID: <20230712110253.paoyrmcbvlhpfxbf@pengutronix.de> References: <20230712094702.1770121-1-u.kleine-koenig@pengutronix.de> <94eb6e4d-9384-152f-351b-ebb217411da9@amd.com> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3iwy3q65ffdde3du" Content-Disposition: inline In-Reply-To: <94eb6e4d-9384-152f-351b-ebb217411da9@amd.com> 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-sunxi@lists.linux.dev --3iwy3q65ffdde3du Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 12, 2023 at 12:46:33PM +0200, Christian K=F6nig wrote: > Am 12.07.23 um 11:46 schrieb Uwe Kleine-K=F6nig: > > Hello, > >=20 > > while I debugged an issue in the imx-lcdc driver I was constantly > > irritated about struct drm_device pointer variables being named "dev" > > because with that name I usually expect a struct device pointer. > >=20 > > I think there is a big benefit when these are all renamed to "drm_dev". > > I have no strong preference here though, so "drmdev" or "drm" are fine > > for me, too. Let the bikesheding begin! > >=20 > > Some statistics: > >=20 > > $ git grep -ohE 'struct drm_device *\* *[^ (),;]*' v6.5-rc1 | sort | un= iq -c | sort -n > > 1 struct drm_device *adev_to_drm > > 1 struct drm_device *drm_ > > 1 struct drm_device *drm_dev > > 1 struct drm_device *drm_dev > > 1 struct drm_device *pdev > > 1 struct drm_device *rdev > > 1 struct drm_device *vdev > > 2 struct drm_device *dcss_drv_dev_to_drm > > 2 struct drm_device **ddev > > 2 struct drm_device *drm_dev_alloc > > 2 struct drm_device *mock > > 2 struct drm_device *p_ddev > > 5 struct drm_device *device > > 9 struct drm_device * dev > > 25 struct drm_device *d > > 95 struct drm_device * > > 216 struct drm_device *ddev > > 234 struct drm_device *drm_dev > > 611 struct drm_device *drm > > 4190 struct drm_device *dev > >=20 > > This series starts with renaming struct drm_crtc::dev to drm_dev. If > > it's not only me and others like the result of this effort it should be > > followed up by adapting the other structs and the individual usages in > > the different drivers. > >=20 > > To make this series a bit easier handleable, I first added an alias for > > drm_crtc::dev, then converted the drivers one after another and the last > > patch drops the "dev" name. This has the advantage of being easier to > > review, and if I should have missed an instance only the last patch must > > be dropped/reverted. Also this series might conflict with other patches, > > in this case the remaining patches can still go in (apart from the last > > one of course). Maybe it also makes sense to delay applying the last > > patch by one development cycle? >=20 > When you automatically generate the patch (with cocci for example) I usua= lly > prefer a single patch instead. Maybe I'm too stupid, but only parts of this patch were created by coccinelle. I failed to convert code like - spin_lock_irq(&crtc->dev->event_lock); + spin_lock_irq(&crtc->drm_dev->event_lock); Added Julia to Cc, maybe she has a hint?! (Up to now it's only=20 @@ struct drm_crtc *crtc; @@ -crtc->dev +crtc->drm_dev ) > Background is that this makes merge conflicts easier to handle and detect. Really? Each file (apart from include/drm/drm_crtc.h) is only touched once. So unless I'm missing something you don't get less or easier conflicts by doing it all in a single patch. But you gain the freedom to drop a patch for one driver without having to drop the rest with it. So I still like the split version better, but I'm open to a more verbose reasoning from your side. > When you have multiple patches and a merge conflict because of some added > lines using the old field the build breaks only on the last patch which > removes the old field. Then you can revert/drop the last patch without having to respin the whole single patch and thus caring for still more conflicts that arise until the new version is sent. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --3iwy3q65ffdde3du Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmSuiFwACgkQj4D7WH0S /k6WQAf+LFgI9NExXKHizIxlAKcu5G8zO7fFx06qBcxLI5KrCwTfZWRX4JdMKpMo 5K/qeFXK6pOtoDJOth+E/cclh0HGZybUMKHNB2GJ5tQhGAf6erqEzGtJybTMfOWT BAMc9FTGfs+HZ5lbSIhDHSNslCbQZEWuEJczrXoi2Cvj7pmoSjyVoCLeeI+4o3Yc SwV3JLE35b4uCAXvLtLMIQGji+tHmW00SBwsa1+biZv+ois13g+seTg5JLw6b9PG EnXcqpqEam0LIDyZCqB65ATzcuYLrBQls79+l8OuEG1R8dCWA6To5Jw9XipxWh53 vPHVg4DCzs8uC2Zxgb1PNd/lhcHymQ== =FqFI -----END PGP SIGNATURE----- --3iwy3q65ffdde3du--