[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev
- To: Christian König <christian.koenig@xxxxxxx>
- From: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
- Date: Wed, 12 Jul 2023 13:02:53 +0200
- Cc: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>, Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie <airlied@xxxxxxxxx>, Daniel Vetter <daniel@xxxxxxxx>, Alex Deucher <alexander.deucher@xxxxxxx>, "Pan, Xinhui" <Xinhui.Pan@xxxxxxx>, Harry Wentland <harry.wentland@xxxxxxx>, Leo Li <sunpeng.li@xxxxxxx>, Rodrigo Siqueira <Rodrigo.Siqueira@xxxxxxx>, Hamza Mahfooz <hamza.mahfooz@xxxxxxx>, Javier Martinez Canillas <javierm@xxxxxxxxxx>, Guchun Chen <guchun.chen@xxxxxxx>, Srinivasan Shanmugam <srinivasan.shanmugam@xxxxxxx>, Evan Quan <evan.quan@xxxxxxx>, Likun Gao <Likun.Gao@xxxxxxx>, Marek Olšák <marek.olsak@xxxxxxx>, David Francis <David.Francis@xxxxxxx>, Hawking Zhang <Hawking.Zhang@xxxxxxx>, Lang Yu <Lang.Yu@xxxxxxx>, Philip Yang <Philip.Yang@xxxxxxx>, Yifan Zhang <yifan1.zhang@xxxxxxx>, Tim Huang <Tim.Huang@xxxxxxx>, Zack Rusin <zackr@xxxxxxxxxx>, Sam Ravnborg <sam@xxxxxxxxxxxx>, Jani Nikula <jani.nikula@xxxxxxxxx>, Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>, Maíra Canal <mairacanal@xxxxxxxxxx>, André Almeida <andrealmeid@xxxxxxxxxx>, Qingqing Zhuo <qingqing.zhuo@xxxxxxx>, Aurabindo Pillai <aurabindo.pillai@xxxxxxx>, Hersen Wu <hersenxs.wu@xxxxxxx>, Fangzhi Zuo <jerry.zuo@xxxxxxx>, Stylon Wang <stylon.wang@xxxxxxx>, Alan Liu <haoping.liu@xxxxxxx>, Wayne Lin <Wayne.Lin@xxxxxxx>, Aaron Liu <aaron.liu@xxxxxxx>, Melissa Wen <mwen@xxxxxxxxxx>, Bhawanpreet Lakha <Bhawanpreet.Lakha@xxxxxxx>, David Tadokoro <davidbtadokoro@xxxxxx>, Wenjing Liu <wenjing.liu@xxxxxxx>, Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>, Mario Limonciello <mario.limonciello@xxxxxxx>, Alexey Kodanev <aleksei.kodanev@xxxxxxxxxxx>, Roman Li <roman.li@xxxxxxx>, Joaquín Ignacio Aramendía <samsagax@xxxxxxxxx>, Dave Airlie <airlied@xxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Liviu Dudau <liviu.dudau@xxxxxxx>, Joel Stanley <joel@xxxxxxxxx>, Boris Brezillon <bbrezillon@xxxxxxxxxx>, Nicolas Ferre <nicolas.ferre@xxxxxxxxxxxxx>, Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>, Claudiu Beznea <claudiu.beznea@xxxxxxxxxxxxx>, Inki Dae <inki.dae@xxxxxxxxxxx>, Seung-Woo Kim <sw0312.kim@xxxxxxxxxxx>, Kyungmin Park <kyungmin.park@xxxxxxxxxxx>, Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>, Stefan Agner <stefan@xxxxxxxx>, Alison Wang <alison.wang@xxxxxxx>, Patrik Jakobsson <patrik.r.jakobsson@xxxxxxxxx>, Noralf Trønnes <noralf@xxxxxxxxxxx>, Xinliang Liu <xinliang.liu@xxxxxxxxxx>, Tian Tao <tiantao6@xxxxxxxxxxxxx>, Danilo Krummrich <dakr@xxxxxxxxxx>, Deepak Rawat <drawat.floss@xxxxxxxxx>, Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>, Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>, Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>, Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx>, Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>, Lucas De Marchi <lucas.demarchi@xxxxxxxxx>, Ankit Nautiyal <ankit.k.nautiyal@xxxxxxxxx>, Andrzej Hajda <andrzej.hajda@xxxxxxxxx>, Matt Roper <matthew.d.roper@xxxxxxxxx>, Stanislav Lisovskiy <stanislav.lisovskiy@xxxxxxxxx>, Radhakrishna Sripada <radhakrishna.sripada@xxxxxxxxx>, Hans de Goede <hdegoede@xxxxxxxxxx>, Luca Coelho <luciano.coelho@xxxxxxxxx>, Niranjana Vishwanathapura <niranjana.vishwanathapura@xxxxxxxxx>, Kai Vehmanen <kai.vehmanen@xxxxxxxxxxxxxxx>, Vinod Govindapillai <vinod.govindapillai@xxxxxxxxx>, Łukasz Bartosik <lb@xxxxxxxxxxxx>, Anusha Srivatsa <anusha.srivatsa@xxxxxxxxx>, Chaitanya Kumar Borah <chaitanya.kumar.borah@xxxxxxxxx>, Uma Shankar <uma.shankar@xxxxxxxxx>, Imre Deak <imre.deak@xxxxxxxxx>, Mitul Golani <mitulkumar.ajitkumar.golani@xxxxxxxxx>, Swati Sharma <swati2.sharma@xxxxxxxxx>, Jouni Högander <jouni.hogander@xxxxxxxxx>, Mika Kahola <mika.kahola@xxxxxxxxx>, José Roberto de Souza <jose.souza@xxxxxxxxx>, Arun R Murthy <arun.r.murthy@xxxxxxxxx>, Gustavo Sousa <gustavo.sousa@xxxxxxxxx>, Khaled Almahallawy <khaled.almahallawy@xxxxxxxxx>, Juha-Pekka Heikkila <juhapekka.heikkila@xxxxxxxxx>, Andi Shyti <andi.shyti@xxxxxxxxxxxxxxx>, Nirmoy Das <nirmoy.das@xxxxxxxxx>, Fei Yang <fei.yang@xxxxxxxxx>, Animesh Manna <animesh.manna@xxxxxxxxx>, Deepak R Varma <drv@xxxxxxxxx>, "Jiri Slaby (SUSE)" <jirislaby@xxxxxxxxxx>, Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>, Vandita Kulkarni <vandita.kulkarni@xxxxxxxxx>, Suraj Kandpal <suraj.kandpal@xxxxxxxxx>, Drew Davenport <ddavenport@xxxxxxxxxxxx>, Laurentiu Palcu <laurentiu.palcu@xxxxxxxxxxx>, Shawn Guo <shawnguo@xxxxxxxxxx>, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>, Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>, Dan Carpenter <error27@xxxxxxxxx>, Paul Cercueil <paul@xxxxxxxxxxxxxxx>, Anitha Chrisanthus <anitha.chrisanthus@xxxxxxxxx>, Paul Kocialkowski <paul.kocialkowski@xxxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>, Chun-Kuang Hu <chunkuang.hu@xxxxxxxxxx>, Matthias Brugger <matthias.bgg@xxxxxxxxx>, Neil Armstrong <neil.armstrong@xxxxxxxxxx>, Kevin Hilman <khilman@xxxxxxxxxxxx>, Rob Clark <robdclark@xxxxxxxxx>, Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>, Vinod Polimera <quic_vpolimer@xxxxxxxxxxx>, Jiasheng Jiang <jiasheng@xxxxxxxxxxx>, Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>, Jessica Zhang <quic_jesszhan@xxxxxxxxxxx>, Liu Shixin <liushixin2@xxxxxxxxxx>, Marek Vasut <marex@xxxxxxx>, Ben Skeggs <bskeggs@xxxxxxxxxx>, Karol Herbst <kherbst@xxxxxxxxxx>, Lyude Paul <lyude@xxxxxxxxxx>, Tomi Valkeinen <tomba@xxxxxxxxxx>, Emma Anholt <emma@xxxxxxxxxx>, Gerd Hoffmann <kraxel@xxxxxxxxxx>, Kieran Bingham <kieran.bingham+renesas@xxxxxxxxxxxxxxxx>, Tomi Valkeinen <tomi.valkeinen+renesas@xxxxxxxxxxxxxxxx>, Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>, Geert Uytterhoeven <geert+renesas@xxxxxxxxx>, Biju Das <biju.das.jz@xxxxxxxxxxxxxx>, Sandy Huang <hjc@xxxxxxxxxxxxxx>, Heiko Stübner <heiko@xxxxxxxxx>, Orson Zhai <orsonzhai@xxxxxxxxx>, Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>, Chunyan Zhang <zhang.lyra@xxxxxxxxx>, Alain Volmat <alain.volmat@xxxxxxxxxxx>, Yannick Fertre <yannick.fertre@xxxxxxxxxxx>, Raphael Gallais-Pou <raphael.gallais-pou@xxxxxxxxxxx>, Philippe Cornu <philippe.cornu@xxxxxxxxxxx>, Maxime Coquelin <mcoquelin.stm32@xxxxxxxxx>, Alexandre Torgue <alexandre.torgue@xxxxxxxxxxx>, Chen-Yu Tsai <wens@xxxxxxxx>, Jernej Skrabec <jernej.skrabec@xxxxxxxxx>, Samuel Holland <samuel@xxxxxxxxxxxx>, Thierry Reding <thierry.reding@xxxxxxxxx>, Mikko Perttunen <mperttunen@xxxxxxxxxx>, Jonathan Hunter <jonathanh@xxxxxxxxxx>, Jyri Sarha <jyri.sarha@xxxxxx>, David Lechner <david@xxxxxxxxxxxxxx>, Kamlesh Gurudasani <kamlesh.gurudasani@xxxxxxxxx>, Rodrigo Siqueira <rodrigosiqueiramelo@xxxxxxxxx>, Melissa Wen <melissa.srw@xxxxxxxxx>, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, Michal Simek <michal.simek@xxxxxxx>, Haneen Mohammed <hamohammed.sa@xxxxxxxxx>, linux-hyperv@xxxxxxxxxxxxxxx, linux-aspeed@xxxxxxxxxxxxxxxx, nouveau@xxxxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, Yongqin Liu <yongqin.liu@xxxxxxxxxx>, Alim Akhtar <alim.akhtar@xxxxxxxxxxx>, Marijn Suijten <marijn.suijten@xxxxxxxxxxxxxx>, Fabio Estevam <festevam@xxxxxxxxx>, Sumit Semwal <sumit.semwal@xxxxxxxxxx>, Jerome Brunet <jbrunet@xxxxxxxxxxxx>, linux-samsung-soc@xxxxxxxxxxxxxxx, amd-gfx@xxxxxxxxxxxxxxxxxxxxx, linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx, linux-rockchip@xxxxxxxxxxxxxxxxxxx, Xinwei Kong <kong.kongxinwei@xxxxxxxxxxxxx>, VMware Graphics Reviewers <linux-graphics-maintainer@xxxxxxxxxx>, NXP Linux Team <linux-imx@xxxxxxx>, spice-devel@xxxxxxxxxxxxxxxxxxxxx, linux-sunxi@xxxxxxxxxxxxxxx, Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>, linux-arm-msm@xxxxxxxxxxxxxxx, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, linux-mediatek@xxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-tegra@xxxxxxxxxxxxxxx, linux-amlogic@xxxxxxxxxxxxxxxxxxx, Gurchetan Singh <gurchetansingh@xxxxxxxxxxxx>, Sean Paul <sean@xxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>, Andrew Jeffery <andrew@xxxxxxxx>, linux-mips@xxxxxxxxxxxxxxx, Chia-I Wu <olvaffe@xxxxxxxxx>, linux-renesas-soc@xxxxxxxxxxxxxxx, kernel@xxxxxxxxxxxxxx, John Stultz <jstultz@xxxxxxxxxx>, freedreno@xxxxxxxxxxxxxxxxxxxxx, Lucas Stach <l.stach@xxxxxxxxxxxxxx>, Julia Lawall <Julia.Lawall@xxxxxxxx>
- Delivery-date: Wed, 12 Jul 2023 11:04:47 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Jul 12, 2023 at 12:46:33PM +0200, Christian König wrote:
> Am 12.07.23 um 11:46 schrieb Uwe Kleine-König:
> > Hello,
> >
> > 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.
> >
> > 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!
> >
> > Some statistics:
> >
> > $ git grep -ohE 'struct drm_device *\* *[^ (),;]*' v6.5-rc1 | sort | uniq
> > -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
> >
> > 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.
> >
> > 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?
>
> When you automatically generate the patch (with cocci for example) I usually
> 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
@@
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
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
Attachment:
signature.asc
Description: PGP signature
|