From: Colin Ian King Date: Wed, 12 Jan 2022 22:34:35 +0000 (+0000) Subject: i915: make array flex_regs static const X-Git-Tag: v6.6.17~3937^2~16^2~1113 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a5d604f90f90a09e35ccfdeeedbadfd06b606db;p=platform%2Fkernel%2Flinux-rpi.git i915: make array flex_regs static const Don't populate the read-only array flex_regs on the stack but instead it static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20220112223435.949071-1-colin.i.king@gmail.com --- diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c index 298857b..f9faf76 100644 --- a/drivers/gpu/drm/i915/i915_perf.c +++ b/drivers/gpu/drm/i915/i915_perf.c @@ -2114,7 +2114,7 @@ gen8_update_reg_state_unlocked(const struct intel_context *ce, u32 ctx_oactxctrl = stream->perf->ctx_oactxctrl_offset; u32 ctx_flexeu0 = stream->perf->ctx_flexeu0_offset; /* The MMIO offsets for Flex EU registers aren't contiguous */ - i915_reg_t flex_regs[] = { + static const i915_reg_t flex_regs[] = { EU_PERF_CNTL0, EU_PERF_CNTL1, EU_PERF_CNTL2,