public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Cc: joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com,
	tvrtko.ursulin@linux.intel.com, airlied@gmail.com,
	daniel@ffwll.ch, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
	Abaci Robot <abaci@linux.alibaba.com>,
	Mika Kahola <mika.kahola@intel.com>
Subject: Re: [PATCH] drm/i915/psr: Fix unsigned expression compared with zero
Date: Wed, 22 Nov 2023 11:14:57 +0200	[thread overview]
Message-ID: <87y1eqm9ny.fsf@intel.com> (raw)
In-Reply-To: <20231122085239.89046-1-jiapeng.chong@linux.alibaba.com>

On Wed, 22 Nov 2023, Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:
> The entry_setup_frames is defined as u8 type, else(entry_setup_frames < 0)
> is invalid. At the same time, the return value of function
> intel_psr_entry_setup_frames is also of type int. so modified
> its type to int.
>
> ./drivers/gpu/drm/i915/display/intel_psr.c:1336:5-23: WARNING: Unsigned expression compared with zero: entry_setup_frames >= 0.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7610
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

There's already a patch. Mika, please follow up with it.

https://patchwork.freedesktop.org/patch/msgid/20231116090512.480373-1-mika.kahola@intel.com

> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index 8d180132a74b..204da50e3f28 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -1319,7 +1319,7 @@ static bool _psr_compute_config(struct intel_dp *intel_dp,
>  {
>  	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
>  	const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;
> -	u8 entry_setup_frames;
> +	int entry_setup_frames;
>  
>  	/*
>  	 * Current PSR panels don't work reliably with VRR enabled

-- 
Jani Nikula, Intel

  reply	other threads:[~2023-11-22  9:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-22  8:52 [PATCH] drm/i915/psr: Fix unsigned expression compared with zero Jiapeng Chong
2023-11-22  9:14 ` Jani Nikula [this message]
2023-11-23  7:06   ` Kahola, Mika

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=87y1eqm9ny.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=abaci@linux.alibaba.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jiapeng.chong@linux.alibaba.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.kahola@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=tvrtko.ursulin@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox