[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: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
- From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
- Date: Thu, 13 Jul 2023 08:52:12 +0200
- Cc: Jani Nikula <jani.nikula@xxxxxxxxx>, 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>, Christian König <christian.koenig@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>, 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>, 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>
- Delivery-date: Thu, 13 Jul 2023 07:35:19 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Uwe,
Let's add some fuel to keep the thread alive ;-)
On Wed, Jul 12, 2023 at 6:13 PM Uwe Kleine-König
<u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
> On Wed, Jul 12, 2023 at 05:34:28PM +0300, Jani Nikula wrote:
> > On Wed, 12 Jul 2023, Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> > wrote:
> > > 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.
> >
> > I think this is an unnecessary change. In drm, a dev is usually a drm
> > device, i.e. struct drm_device *.
>
> Well, unless it's not. Prominently there is
>
> struct drm_device {
> ...
> struct device *dev;
> ...
> };
>
> which yields quite a few code locations using dev->dev which is
> IMHO unnecessary irritating:
>
> $ git grep '\<dev->dev' v6.5-rc1 drivers/gpu/drm | wc -l
> 1633
I find that irritating as well...
Same for e.g. crtc->crtc.
Hence that's why I had sent patches to rename the base members in the
shmob_drm-specific subclasses of drm_{crtc,connector,plane} to "base".
https://lore.kernel.org/dri-devel/b3daca80f82625ba14e3aeaf2fca6dcefa056e47.1687423204.git.geert+renesas@xxxxxxxxx
> Also the functions that deal with both a struct device and a struct
> drm_device often use "dev" for the struct device and then "ddev" for
> the drm_device (see for example amdgpu_device_get_pcie_replay_count()).
I guess you considered "drm_dev", because it is still a short name?
Code dealing with platform devices usually uses "pdev" and "dev".
Same for PCI drivers (despite "pci_dev" being a short name).
So my personal preference goes to "ddev".
EOF (End-of-Fuel ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
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
|