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 93A8FC0015E for ; Thu, 13 Jul 2023 08:41:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234608AbjGMIlC convert rfc822-to-8bit (ORCPT ); Thu, 13 Jul 2023 04:41:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234564AbjGMIkr (ORCPT ); Thu, 13 Jul 2023 04:40:47 -0400 Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30B61E4D; Thu, 13 Jul 2023 01:36:44 -0700 (PDT) Received: by mail-qt1-f169.google.com with SMTP id d75a77b69052e-403af7dfa3aso4587651cf.0; Thu, 13 Jul 2023 01:36:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689237403; x=1691829403; 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=a+0qanWxODhzgXHCXIxDgPeQhxCw3xhLkeN7rWN/J3A=; b=W+btkXvTnlgU0dzYMDI8e//DLPRI2USnizu4KHEdelYvmIA9q0XwVi4KHesoNPzFoV xK5nGSmrqTmWlRg/teen2IxFyC4bpupnVRW3GIirgaLv60KOupxp05TTOxUDHKqatIoc H6X1tB4QRbYyXK1zkFyPdFtN9iu3+lthr7HdtQSrlYHefU4gBiQxwoDXC0anuTSYEOQn yokS6Y5e+kvbImc7OKxSIgKCexxpZSmh01g9cbwlGOwd8Y75j8opR+SMFiMrofeEfjb1 HofpeHnL01zmofxaQqqKEtQSqKN9IMSu67zYl9nDVtOsb9hjj0HcFcw+Btptp/K8B773 EIDg== X-Gm-Message-State: ABy/qLb8UtozQjkEIDWZy9RgIctQl4QTpQemO2EerKB0RQUU/KszU8Fz KkPL7n8jrvnM9RNDEFoWGdzh7n4YLrlaDA== X-Google-Smtp-Source: APBJJlHgNtQnxSUDdXdSvYQx8SbaG8vUIjGowTleSi2vAb7EJ5IdimAcmscNOCM8eyhvVJXGWc0JZQ== X-Received: by 2002:a05:622a:199b:b0:403:b1f4:2508 with SMTP id u27-20020a05622a199b00b00403b1f42508mr1242404qtc.27.1689231170004; Wed, 12 Jul 2023 23:52:50 -0700 (PDT) Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com. [209.85.160.170]) by smtp.gmail.com with ESMTPSA id x13-20020ac8538d000000b00403ad47c895sm2863650qtp.22.2023.07.12.23.52.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Jul 2023 23:52:49 -0700 (PDT) Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-403af7dfa3aso4007221cf.0; Wed, 12 Jul 2023 23:52:49 -0700 (PDT) X-Received: by 2002:a0d:e208:0:b0:56d:9e2:7d9e with SMTP id l8-20020a0de208000000b0056d09e27d9emr931586ywe.21.1689231149403; Wed, 12 Jul 2023 23:52:29 -0700 (PDT) MIME-Version: 1.0 References: <20230712094702.1770121-1-u.kleine-koenig@pengutronix.de> <87fs5tgpvv.fsf@intel.com> <20230712161025.22op3gtzgujrhytb@pengutronix.de> In-Reply-To: <20230712161025.22op3gtzgujrhytb@pengutronix.de> From: Geert Uytterhoeven Date: Thu, 13 Jul 2023 08:52:12 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev To: =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= Cc: Jani Nikula , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Harry Wentland , Leo Li , Rodrigo Siqueira , Hamza Mahfooz , Javier Martinez Canillas , Guchun Chen , Srinivasan Shanmugam , Evan Quan , Likun Gao , =?UTF-8?B?TWFyZWsgT2zFocOhaw==?= , David Francis , Hawking Zhang , Lang Yu , Philip Yang , Yifan Zhang , Tim Huang , Zack Rusin , Sam Ravnborg , Laurent Pinchart , =?UTF-8?B?TWHDrXJhIENhbmFs?= , =?UTF-8?Q?Andr=C3=A9_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 , =?UTF-8?Q?Noralf_Tr=C3=B8nnes?= , Xinliang Liu , Tian Tao , Danilo Krummrich , Deepak Rawat , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= , 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 , =?UTF-8?Q?Jouni_H=C3=B6gander?= , Mika Kahola , =?UTF-8?Q?Jos=C3=A9_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 , =?UTF-8?Q?Heiko_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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.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 wrote: > On Wed, Jul 12, 2023 at 05:34:28PM +0300, Jani Nikula wrote: > > On Wed, 12 Jul 2023, Uwe Kleine-König 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' 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@glider.be > 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@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