public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	David Weinehall <david.weinehall@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/4] drm/i915: Consistent struct device naming
Date: Tue, 02 Aug 2016 11:44:21 +0300	[thread overview]
Message-ID: <87vazjsgpm.fsf@intel.com> (raw)
In-Reply-To: <1470125022.4009.3.camel@linux.intel.com>

On Tue, 02 Aug 2016, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote:
> On ma, 2016-08-01 at 19:57 +0100, Chris Wilson wrote:
>> On Mon, Aug 01, 2016 at 06:38:53PM +0300, David Weinehall wrote:
>> > 
>> > We currently have a mix of struct device *device, struct device *kdev,
>> > and struct device *dev (the latter forcing us to refer to
>> > struct drm_device as something else than the normal dev).
>> > 
>> > To simplify things, always use kdev when referring to struct device.
>> > 
>> > Signed-off-by: David Weinehall <david.weinehall@linux.intel.com>
>> kdev may be confused with kdev_t, but seems reasonable due to kobj.
>> 
>> This patch is an improvement, so
>> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
>> 
>> but I was wondering if
>> 
>> struct device *dev;
>> struct drm_device *drm;
>> struct i915_device *i915;
>> 
>
> I'd vote for this scheme.

In the driver,

30 out of 52 struct device * decls use "dev".

1233 out of 1251 struct drm_device * decls use "dev".

2112 out of 2154 struct drm_i915_private * decls use "dev_priv".

By all means change struct device *dev to something else, like kdev, or
whatever.

But do we really not have better things to do than come up with ways to
create tons of rename churn, increasing the cognitive burden of
developers, forcing rebases of tons of in-flight code making it harder
to get code in, creating conflicts for backporting fixes, and so on?

I'm firmly behind sticking with struct drm_i915_private *dev_priv and
struct drm_device *dev.


BR,
Jani.

>
> Regards, Joonas
>
>> (struct i915_device is move apt now than drm_i915_private due to the
>> subclassing)
>> 
>> made more sense as a longterm goal?
>> -Chris
>> 

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-08-02  8:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-01 15:38 [PATCH 0/4] Various cleanup David Weinehall
2016-08-01 15:38 ` [PATCH 1/4] drm/i915: Cosmetic fixes in i915_drv.h David Weinehall
2016-08-01 18:54   ` Chris Wilson
2016-08-01 15:38 ` [PATCH 2/4] drm/i915: Consistent struct device naming David Weinehall
2016-08-01 18:57   ` Chris Wilson
2016-08-02  8:03     ` Joonas Lahtinen
2016-08-02  8:44       ` Jani Nikula [this message]
2016-08-01 15:38 ` [PATCH 3/4] drm/i915: Consistent drm_minor use David Weinehall
2016-08-01 19:01   ` Chris Wilson
2016-08-02  8:06     ` Joonas Lahtinen
2016-08-01 15:38 ` [PATCH 4/4] drm/i915: pdev cleanup David Weinehall
2016-08-01 19:03   ` Chris Wilson
2016-08-01 15:58 ` ✗ Ro.CI.BAT: failure for Various cleanup Patchwork

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=87vazjsgpm.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=david.weinehall@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    /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