diff options
author | Jani Nikula <jani.nikula@intel.com> | 2023-03-09 15:17:46 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-20 02:29:46 +0300 |
commit | 6d4f49b7dec3126c6d5491bcea5ae815b025d042 (patch) | |
tree | b4631e7c30f93c3f140a84bedf75a43b0bef6433 /drivers/gpu/drm/xe/xe_rtp.h | |
parent | 91ed180b419a1b2ccf9cc41999cb87eb9805fa38 (diff) | |
download | linux-6d4f49b7dec3126c6d5491bcea5ae815b025d042.tar.xz |
drm/xe: make compound literal initialization const
Be careful about having const in the compound literal initialization to
keep the initializers in rodata. Here, the impact is 1.8k of mutable
data moved to rodata.
add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-1804 (-1804)
Data old new delta
__compound_literal 1804 - -1804
Total: Before=42425, After=40621, chg -4.25%
add/remove: 0/0 grow/shrink: 1/0 up/down: 1804/0 (1804)
RO Data old new delta
__compound_literal 7696 9500 +1804
Total: Before=138535, After=140339, chg +1.30%
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20230309121746.479146-1-jani.nikula@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_rtp.h')
-rw-r--r-- | drivers/gpu/drm/xe/xe_rtp.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_rtp.h b/drivers/gpu/drm/xe/xe_rtp.h index 433f0cbff57f..ac983ce93684 100644 --- a/drivers/gpu/drm/xe/xe_rtp.h +++ b/drivers/gpu/drm/xe/xe_rtp.h @@ -363,7 +363,7 @@ struct xe_reg_sr; */ #define XE_RTP_RULES(r1, ...) \ .n_rules = COUNT_ARGS(r1, ##__VA_ARGS__), \ - .rules = (struct xe_rtp_rule[]) { \ + .rules = (const struct xe_rtp_rule[]) { \ CALL_FOR_EACH(__ADD_XE_RTP_RULE_PREFIX, r1, ##__VA_ARGS__) \ } @@ -390,7 +390,7 @@ struct xe_reg_sr; */ #define XE_RTP_ACTIONS(a1, ...) \ .n_actions = COUNT_ARGS(a1, ##__VA_ARGS__), \ - .actions = (struct xe_rtp_action[]) { \ + .actions = (const struct xe_rtp_action[]) { \ CALL_FOR_EACH(__ADD_XE_RTP_ACTION_PREFIX, a1, ##__VA_ARGS__) \ } |