dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: "Sean Paul" <seanpaul@chromium.org>,
	kernel@pengutronix.de, "Sui Jingfeng" <suijingfeng@loongson.cn>,
	"Andrzej Hajda" <andrzej.hajda@intel.com>,
	dri-devel@lists.freedesktop.org,
	"Russell King (Oracle)" <linux@armlinux.org.uk>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Javier Martinez Canillas" <javierm@redhat.com>,
	"Julia Lawall" <julia.lawall@inria.fr>,
	"Luben Tuikov" <luben.tuikov@amd.com>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Geert Uytterhoeven" <geert@linux-m68k.org>,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH 00/17] drm: rename various struct members "dev" -> "drm"
Date: Thu, 13 Jul 2023 15:40:18 +0200	[thread overview]
Message-ID: <ZK_-wroLky0R-BWp@aptenodytes> (raw)
In-Reply-To: <87v8eof4w8.fsf@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1598 bytes --]

Hi,

On Thu 13 Jul 23, 14:05, Jani Nikula wrote:
> On Thu, 13 Jul 2023, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> > If you say you consider the idea bad or too costly to implement, that's
> > fine. But pointing to other areas that are bad shouldn't be a relevant
> > reason to shoot down this effort.
> 
> I did not point to other places saying they're "bad". That's your
> opinion, not mine. I don't think the drm usage of the dev name is bad,
> and I pointed out drm is not alone in using it.

For what it's worth, my personal rule is to use a prefix to dev if there
are multiple variables of a whatever-called-device type, and just call it dev if
there is nothing else about a device.

So as expressed before, I also don't see the problem with drm_device being
called dev, which I find a lot more descriptive than drm.

There's a general pattern that is usually applied to devices (not just drm):
- struct driver_specific_dev
  - struct subsystem_specific_dev
    - struct device

So I always find it quite clear which type of device we are talking about
when accessing a dev member of one of these. Suggesting that the name dev is
bad for something that refers to the subsystem-specific dev in some
subsystem-specific object kind of implies that it would make sense to have
a struct device called dev in that structure, which adds more confusion as this
is generally not the case.

So I would also be happier without this change.

Cheers,

Paul

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2023-07-13 13:40 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-13  8:23 [PATCH 00/17] drm: rename various struct members "dev" -> "drm" Uwe Kleine-König
2023-07-13  8:23 ` [PATCH 01/17] drm/atomic_state: Rename struct drm_atomic_state::dev to drm Uwe Kleine-König
2023-07-13  8:23 ` [PATCH 02/17] drm/bridge: Rename struct drm_bridge::dev " Uwe Kleine-König
2023-07-13  8:23 ` [PATCH 03/17] drm/client_dev: Rename struct drm_client_dev::dev " Uwe Kleine-König
2023-07-13  8:23 ` [PATCH 04/17] drm/connector: Rename struct drm_connector::dev " Uwe Kleine-König
2023-07-13  8:23 ` [PATCH 05/17] drm/crtc: Rename struct drm_crtc::dev " Uwe Kleine-König
2023-07-13  8:23 ` [PATCH 06/17] drm/debugfs_entry: Rename struct drm_debugfs_entry::dev " Uwe Kleine-König
2023-07-13  8:23 ` [PATCH 07/17] drm/dp_mst_topology_mgr: Rename struct drm_dp_mst_topology_mgr::dev " Uwe Kleine-König
2023-07-13  8:23 ` [PATCH 08/17] drm/encoder: Rename struct drm_encoder::dev " Uwe Kleine-König
2023-07-13  8:24 ` [PATCH 09/17] drm/fb_helper: Rename struct drm_fb_helper::dev " Uwe Kleine-König
2023-07-13  8:24 ` [PATCH 10/17] drm/framebuffer: Rename struct drm_framebuffer::dev " Uwe Kleine-König
2023-07-13  8:24 ` [PATCH 11/17] drm/gem_object: Rename struct drm_gem_object::dev " Uwe Kleine-König
2023-07-13  8:24 ` [PATCH 12/17] drm/master: Rename struct drm_master::dev " Uwe Kleine-König
2023-07-13  8:24 ` [PATCH 13/17] drm/minor: Rename struct drm_minor::dev " Uwe Kleine-König
2023-07-13  8:24 ` [PATCH 14/17] drm/plane: Rename struct drm_plane::dev " Uwe Kleine-König
2023-07-13  8:24 ` [PATCH 15/17] drm/property_blob: Rename struct drm_property_blob::dev " Uwe Kleine-König
2023-07-13  8:24 ` [PATCH 16/17] drm/property: Rename struct drm_property::dev " Uwe Kleine-König
2023-07-13  8:24 ` [PATCH 17/17] drm/vblank_crtc: Rename struct drm_vblank_crtc::dev " Uwe Kleine-König
2023-07-13  9:23 ` [PATCH 00/17] drm: rename various struct members "dev" -> "drm" Jani Nikula
2023-07-13 10:39   ` Uwe Kleine-König
2023-07-13 11:05     ` Jani Nikula
2023-07-13 13:40       ` Paul Kocialkowski [this message]
2023-07-13 11:17     ` Maxime Ripard
2023-07-13 14:10       ` Uwe Kleine-König
2023-07-13 14:24         ` Thomas Zimmermann
2023-07-13 14:38         ` Christian König
2023-07-13 15:47         ` Maxime Ripard
2023-07-13 15:59           ` Javier Martinez Canillas
2023-07-14  7:11           ` Uwe Kleine-König
2023-07-13 16:18         ` Jani Nikula
2023-07-14 10:51         ` Paul Kocialkowski
2023-08-02  9:49   ` Jani Nikula
2023-07-13 10:04 ` Thomas Zimmermann
2023-07-13 10:22   ` Uwe Kleine-König
2023-07-13 10:41     ` Thomas Zimmermann
2023-07-13 13:11       ` Uwe Kleine-König
2023-07-13 14:08         ` Thomas Zimmermann
2023-07-13 11:52 ` Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZK_-wroLky0R-BWp@aptenodytes \
    --to=paul.kocialkowski@bootlin.com \
    --cc=andrzej.hajda@intel.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=jani.nikula@intel.com \
    --cc=javierm@redhat.com \
    --cc=julia.lawall@inria.fr \
    --cc=kernel@pengutronix.de \
    --cc=krzk@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=luben.tuikov@amd.com \
    --cc=mripard@kernel.org \
    --cc=seanpaul@chromium.org \
    --cc=suijingfeng@loongson.cn \
    --cc=thierry.reding@gmail.com \
    --cc=tzimmermann@suse.de \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox