All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Stone <daniel@fooishbar.org>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
	Daniel Stone <daniels@collabora.com>
Subject: Re: [PATCH 1/2] drm/i915/pm: Unconstify power_domain_str
Date: Thu, 19 Nov 2015 20:39:10 +0200	[thread overview]
Message-ID: <20151119183910.GX4437@intel.com> (raw)
In-Reply-To: <CAPj87rPA7-r6=eX3iXCK1mdqX-G1nCdY5kShb+L_sN0qW6cJOQ@mail.gmail.com>

On Thu, Nov 19, 2015 at 06:26:23PM +0000, Daniel Stone wrote:
> Hey,
> 
> On 19 November 2015 at 18:24, Ville Syrjälä
> <ville.syrjala@linux.intel.com> wrote:
> > On Thu, Nov 19, 2015 at 05:59:10PM +0000, Daniel Stone wrote:
> >> +static inline const char *
> >> +intel_display_power_domain_str(enum intel_display_power_domain domain)
> >
> > It's still const. And I assume now we end up duplicating these strings
> > in every object file that calls this. Why don't you just remove the
> > "static" from the original?
> 
> Right, 'unstatic' is what I meant. Dropping const wouldn't have been
> very clever.
> 
> Surely gcc's DCE pass will trivially eliminate this?

Dunno. But I rather dislike having code in headers anyway.

> I put it so it
> could lie next to the enum definition itself, but if you'd prefer,
> I'll happily move the definition to intel_runtime_pm.c (or whatever
> shed colour is deemed appropriate) instead.
> 
> Cheers,
> Daniel

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-11-19 18:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19 17:59 [PATCH 1/2] drm/i915/pm: Unconstify power_domain_str Daniel Stone
2015-11-19 17:59 ` [PATCH 2/2] drm/i915/pm: Print offending domain in refcount failure Daniel Stone
2015-11-19 18:24 ` [PATCH 1/2] drm/i915/pm: Unconstify power_domain_str Ville Syrjälä
2015-11-19 18:26   ` Daniel Stone
2015-11-19 18:39     ` Ville Syrjälä [this message]
2015-11-20  8:21       ` Jani Nikula
2015-11-20 15:56         ` Daniel Stone

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=20151119183910.GX4437@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel@fooishbar.org \
    --cc=daniels@collabora.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.