All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jason Ekstrand <jason@jlekstrand.net>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/pm: Make the wm parameter of print_wm_latency a pointer
Date: Tue, 20 Apr 2021 10:10:04 -0400	[thread overview]
Message-ID: <YH7gvD+4MwffnXU5@intel.com> (raw)
In-Reply-To: <20210413173259.472405-1-jason@jlekstrand.net>

On Tue, Apr 13, 2021 at 12:32:59PM -0500, Jason Ekstrand wrote:
> This fixes the following build error with GCC 11:
> 
>     In function ‘snb_wm_latency_quirk’,
>         inlined from ‘ilk_setup_wm_latency’ at drivers/gpu/drm/i915/intel_pm.c:3109:3,
>         inlined from ‘intel_init_pm’ at drivers/gpu/drm/i915/intel_pm.c:7695:3:
>     drivers/gpu/drm/i915/intel_pm.c:3058:9: error: ‘intel_print_wm_latency’ reading 16 bytes from a region of size 10 [-Werror=stringop-overread]
>      3058 |         intel_print_wm_latency(dev_priv, "Primary", dev_priv->wm.pri_latency);
>           |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     drivers/gpu/drm/i915/intel_pm.c: In function ‘intel_init_pm’:
>     drivers/gpu/drm/i915/intel_pm.c:3058:9: note: referencing argument 3 of type ‘const u16 *’ {aka ‘const short unsigned int *’}
>     drivers/gpu/drm/i915/intel_pm.c:2995:13: note: in a call to function ‘intel_print_wm_latency’
>      2995 | static void intel_print_wm_latency(struct drm_i915_private *dev_priv,
>           |             ^~~~~~~~~~~~~~~~~~~~~~
> 
> As far as I can tell, we don't actually need 8 elements except on SKL
> and that uses dev_priv->wm.skl_latency which has enough.
> 
> Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

and pushed. Thanks for the patch.

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 3f6d8b502a619..59498794ac4ea 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -2994,7 +2994,7 @@ int ilk_wm_max_level(const struct drm_i915_private *dev_priv)
>  
>  static void intel_print_wm_latency(struct drm_i915_private *dev_priv,
>  				   const char *name,
> -				   const u16 wm[8])
> +				   const u16 *wm)
>  {
>  	int level, max_level = ilk_wm_max_level(dev_priv);
>  
> -- 
> 2.31.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      parent reply	other threads:[~2021-04-20 14:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 17:32 [Intel-gfx] [PATCH] drm/i915/pm: Make the wm parameter of print_wm_latency a pointer Jason Ekstrand
2021-04-13 17:42 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2021-04-13 17:46 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2021-04-13 18:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-04-13 19:56 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-04-20 14:10 ` Rodrigo Vivi [this message]

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=YH7gvD+4MwffnXU5@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jason@jlekstrand.net \
    /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.