All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: imre.deak@intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: move tons of power well initializers to rodata
Date: Mon, 02 May 2022 12:12:53 +0300	[thread overview]
Message-ID: <87bkwgs3fu.fsf@intel.com> (raw)
In-Reply-To: <YmwlRc9zwhqJ9XIF@ideak-desk.fi.intel.com>

On Fri, 29 Apr 2022, Imre Deak <imre.deak@intel.com> wrote:
> On Fri, Apr 29, 2022 at 05:21:40PM +0300, Jani Nikula wrote:
>> Using compound literals for initialization can be tricky. Lacking a
>> const qualifier, they won't end up in rodata, which is probably not
>> expected or intended. Add const to move a whopping 136 initializers to
>> rodata.
>> 
>> Compare:
>> 
>> $ objdump --syms drivers/gpu/drm/i915/display/intel_display_power_map.o | grep "\.rodata.*__compound_literal"
>> $ objdump --syms drivers/gpu/drm/i915/display/intel_display_power_map.o | grep "\.data.*__compound_literal"
>> 
>> Before and after the change.
>> 
>> Fixes: c32ffce42aa5 ("drm/i915: Convert the power well descriptor domain mask to an array of domains")
>> Fixes: 4a845ff0c0d4 ("drm/i915: Simplify power well definitions by adding power well instances")
>> Cc: Imre Deak <imre.deak@intel.com>
>> Cc: Jouni Högander <jouni.hogander@intel.com>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>
> Reviewed-by: Imre Deak <imre.deak@intel.com>

Thanks, pushed to drm-intel-next.

BR,
Jani.

>
>> ---
>>  drivers/gpu/drm/i915/display/intel_display_power_map.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_display_power_map.c b/drivers/gpu/drm/i915/display/intel_display_power_map.c
>> index af6f54a26a35..97b367f39f35 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display_power_map.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display_power_map.c
>> @@ -21,7 +21,7 @@
>>  
>>  #define I915_PW_DOMAINS(...) \
>>  	(const struct i915_power_domain_list) \
>> -		__LIST(__LIST_INLINE_ELEMS(enum intel_display_power_domain, __VA_ARGS__))
>> +		__LIST(__LIST_INLINE_ELEMS(const enum intel_display_power_domain, __VA_ARGS__))
>>  
>>  #define I915_DECL_PW_DOMAINS(__name, ...) \
>>  	static const struct i915_power_domain_list __name = I915_PW_DOMAINS(__VA_ARGS__)
>> @@ -32,7 +32,7 @@
>>  
>>  #define I915_PW_INSTANCES(...) \
>>  	(const struct i915_power_well_instance_list) \
>> -		__LIST(__LIST_INLINE_ELEMS(struct i915_power_well_instance, __VA_ARGS__))
>> +		__LIST(__LIST_INLINE_ELEMS(const struct i915_power_well_instance, __VA_ARGS__))
>>  
>>  #define I915_PW(_name, _domain_list, ...) \
>>  	{ .name = _name, .domain_list = _domain_list, ## __VA_ARGS__ }
>> -- 
>> 2.30.2
>> 

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2022-05-02  9:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 14:21 [Intel-gfx] [PATCH] drm/i915: move tons of power well initializers to rodata Jani Nikula
2022-04-29 15:58 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-04-29 16:24 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-04-29 17:49 ` [Intel-gfx] [PATCH] " Imre Deak
2022-05-02  9:12   ` Jani Nikula [this message]
2022-04-29 18:16 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " 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=87bkwgs3fu.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=imre.deak@intel.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.