kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][RESEND] i915: make array flex_regs static const
@ 2022-01-12 22:34 Colin Ian King
  2022-01-13  9:21 ` Jani Nikula
  0 siblings, 1 reply; 3+ messages in thread
From: Colin Ian King @ 2022-01-12 22:34 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
	David Airlie, Daniel Vetter, intel-gfx, dri-devel
  Cc: kernel-janitors, linux-kernel

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 <colin.i.king@gmail.com>

---

RESEND: Use correct e-mail address for sign-off and From: in e-mail.

---
 drivers/gpu/drm/i915/i915_perf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index e27f3b7cf094..df698960fdc0 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,
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][RESEND] i915: make array flex_regs static const
  2022-01-12 22:34 [PATCH][RESEND] i915: make array flex_regs static const Colin Ian King
@ 2022-01-13  9:21 ` Jani Nikula
  2022-01-14 15:40   ` Tvrtko Ursulin
  0 siblings, 1 reply; 3+ messages in thread
From: Jani Nikula @ 2022-01-13  9:21 UTC (permalink / raw)
  To: Colin Ian King, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
	David Airlie, Daniel Vetter, intel-gfx, dri-devel
  Cc: kernel-janitors, linux-kernel

On Wed, 12 Jan 2022, Colin Ian King <colin.i.king@gmail.com> wrote:
> 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 <colin.i.king@gmail.com>
>
> ---
>
> RESEND: Use correct e-mail address for sign-off and From: in e-mail.

There are a number of things at play here:

- Our tooling checks for certain things, such as author/signed-off-by
  match, after applying the patch.

- You have an entry in the kernel git .mailmap.

- The git log.mailmap config default has changed from false to true.

We apply the patch, and, with the default options, git show will display
a different author than the signed-off-by.

We should use --no-use-mailmap when examining a commit to ensure the
commit is internally consistent, regardless of .mailmap.


BR,
Jani.


>
> ---
>  drivers/gpu/drm/i915/i915_perf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> index e27f3b7cf094..df698960fdc0 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,

-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][RESEND] i915: make array flex_regs static const
  2022-01-13  9:21 ` Jani Nikula
@ 2022-01-14 15:40   ` Tvrtko Ursulin
  0 siblings, 0 replies; 3+ messages in thread
From: Tvrtko Ursulin @ 2022-01-14 15:40 UTC (permalink / raw)
  To: Jani Nikula, Colin Ian King, Joonas Lahtinen, Rodrigo Vivi,
	David Airlie, Daniel Vetter, intel-gfx, dri-devel
  Cc: kernel-janitors, linux-kernel


On 13/01/2022 09:21, Jani Nikula wrote:
> On Wed, 12 Jan 2022, Colin Ian King <colin.i.king@gmail.com> wrote:
>> 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 <colin.i.king@gmail.com>
>>
>> ---
>>
>> RESEND: Use correct e-mail address for sign-off and From: in e-mail.
> 
> There are a number of things at play here:
> 
> - Our tooling checks for certain things, such as author/signed-off-by
>    match, after applying the patch.
> 
> - You have an entry in the kernel git .mailmap.
> 
> - The git log.mailmap config default has changed from false to true.
> 
> We apply the patch, and, with the default options, git show will display
> a different author than the signed-off-by.
> 
> We should use --no-use-mailmap when examining a commit to ensure the
> commit is internally consistent, regardless of .mailmap.

Yes that sounds like the right thing to do.

In the meantime I have pushed this patch.

Regards,

Tvrtko


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-14 15:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-12 22:34 [PATCH][RESEND] i915: make array flex_regs static const Colin Ian King
2022-01-13  9:21 ` Jani Nikula
2022-01-14 15:40   ` Tvrtko Ursulin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).