lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZVKHvNqDsblTfJ8A@intel.com>
Date:   Mon, 13 Nov 2023 15:31:56 -0500
From:   Rodrigo Vivi <rodrigo.vivi@...el.com>
To:     heminhong <heminhong@...inos.cn>
CC:     <jani.nikula@...ux.intel.com>, <joonas.lahtinen@...ux.intel.com>,
        <tvrtko.ursulin@...ux.intel.com>, <airlied@...il.com>,
        <daniel@...ll.ch>, <ville.syrjala@...ux.intel.com>,
        <animesh.manna@...el.com>, <uma.shankar@...el.com>,
        <ankit.k.nautiyal@...el.com>, <intel-gfx@...ts.freedesktop.org>,
        <dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
        Ville Syrjälä <ville.syrjala@...el.com>
Subject: Re: [PATCH] drm/i915: eliminate warnings

On Mon, Nov 13, 2023 at 11:36:13AM +0800, heminhong wrote:
> Current, the dewake_scanline variable is defined as unsigned int,
> an unsigned int variable that is always greater than or equal to 0.
> when _intel_dsb_commit function is called by intel_dsb_commit function,
> the dewake_scanline variable may have an int value.
> So the dewake_scanline variable is necessary to defined as an int.

A good catch. But this patch deserves a better commit subject since
it is not just fixing 'warnings' but the behavior of this function
accounts on the -1 that is explicitly given as input in some cases.

> 
> Signed-off-by: heminhong <heminhong@...inos.cn>

also perhaps:
Fixes: f83b94d23770 ("drm/i915/dsb: Use DEwake to combat PkgC latency")
Cc: Ville Syrjälä <ville.syrjala@...ux.intel.com>
Cc: Uma Shankar <uma.shankar@...el.com>

?

> ---
>  drivers/gpu/drm/i915/display/intel_dsb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
> index 78b6fe24dcd8..7fd6280c54a7 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -340,7 +340,7 @@ static int intel_dsb_dewake_scanline(const struct intel_crtc_state *crtc_state)
>  }
>  
>  static void _intel_dsb_commit(struct intel_dsb *dsb, u32 ctrl,
> -			      unsigned int dewake_scanline)
> +			      int dewake_scanline)
>  {
>  	struct intel_crtc *crtc = dsb->crtc;
>  	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
> -- 
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ