public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: intel-gfx@lists.freedesktop.org,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 2/7] drm/nouveau: replace drm_get_connector_name() with direct name field use
Date: Mon, 26 May 2014 21:41:46 +0300	[thread overview]
Message-ID: <8761kso00l.fsf@intel.com> (raw)
In-Reply-To: <CAKb7UvjSBnCZu+w2VVMR6WKWJ8s-S0AeMMSapBktYD3udJaYYg@mail.gmail.com>

On Mon, 26 May 2014, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
> On Mon, May 26, 2014 at 9:35 AM, Jani Nikula <jani.nikula@intel.com> wrote:
>> Generated using semantic patch:
>>
>> @@
>> expression E;
>> @@
>>
>> - drm_get_connector_name(E)
>> + E->name
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  drivers/gpu/drm/nouveau/dispnv04/dac.c      | 2 +-
>>  drivers/gpu/drm/nouveau/dispnv04/dfp.c      | 2 +-
>>  drivers/gpu/drm/nouveau/dispnv04/disp.c     | 2 +-
>>  drivers/gpu/drm/nouveau/dispnv04/tvnv04.c   | 3 ++-
>>  drivers/gpu/drm/nouveau/dispnv04/tvnv17.c   | 3 +--
>>  drivers/gpu/drm/nouveau/nouveau_connector.c | 8 ++++----
>>  drivers/gpu/drm/nouveau/nv50_display.c      | 2 +-
>>  7 files changed, 11 insertions(+), 11 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/nouveau/dispnv04/dac.c b/drivers/gpu/drm/nouveau/dispnv04/dac.c
>> index 434b920f6bd4..d4d95df2b3c6 100644
>> --- a/drivers/gpu/drm/nouveau/dispnv04/dac.c
>> +++ b/drivers/gpu/drm/nouveau/dispnv04/dac.c
>> @@ -414,7 +414,7 @@ static void nv04_dac_commit(struct drm_encoder *encoder)
>>         helper->dpms(encoder, DRM_MODE_DPMS_ON);
>>
>>         NV_DEBUG(drm, "Output %s is running on CRTC %d using output %c\n",
>> -                drm_get_connector_name(&nouveau_encoder_connector_get(nv_encoder)->base),
>> +                (&nouveau_encoder_connector_get(nv_encoder)->base)->name,
>
> That looks pretty vile... how about
>
> nouveau_encoder_connector_get(nv_encoder)->base.name

Ugh, agreed. Let me see if I can tweak the semantic patch, or if I need
to do it manually.

Thanks,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center

  reply	other threads:[~2014-05-26 18:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-26 13:35 [PATCH 0/7] drm & drivers: kill drm_get_connector_name() and drm_get_encoder_name() Jani Nikula
2014-05-26 13:35 ` [PATCH 1/7] drm/i915: replace drm_get_connector_name() with direct name field use Jani Nikula
2014-05-26 13:35 ` [PATCH 2/7] drm/nouveau: " Jani Nikula
2014-05-26 15:50   ` Ilia Mirkin
2014-05-26 18:41     ` Jani Nikula [this message]
2014-05-26 13:35 ` [PATCH 3/7] drm/radeon: " Jani Nikula
2014-05-26 13:35 ` [PATCH 4/7] drm: " Jani Nikula
2014-05-26 13:35 ` [PATCH 5/7] drm/i915: replace drm_get_encoder_name() " Jani Nikula
2014-05-26 13:35 ` [PATCH 6/7] drm: " Jani Nikula
2014-05-26 13:35 ` [PATCH 7/7] drm: drop drm_get_connector_name() and drm_get_encoder_name() Jani Nikula
2014-05-26 13:52 ` [PATCH 0/7] drm & drivers: kill " Daniel Vetter
2014-05-26 13:52   ` Daniel Vetter
2014-05-26 14:10     ` Christian König
2014-05-27 15:35   ` Alex Deucher
2014-05-26 15:00 ` David Herrmann

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=8761kso00l.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imirkin@alum.mit.edu \
    --cc=intel-gfx@lists.freedesktop.org \
    /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