From: Jani Nikula <jani.nikula@linux.intel.com>
To: cgel.zte@gmail.com
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org,
luo penghao <luo.penghao@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [Intel-gfx] [PATCH linux-next] drm/i915/display: Remove the useless variable offset and its assignment
Date: Wed, 08 Dec 2021 10:40:49 +0200 [thread overview]
Message-ID: <87y24v4hgu.fsf@intel.com> (raw)
In-Reply-To: <20211208074952.404381-1-luo.penghao@zte.com.cn>
On Wed, 08 Dec 2021, cgel.zte@gmail.com wrote:
> From: luo penghao <luo.penghao@zte.com.cn>
>
> The existence of offset is meaningless, so it should be deleted.
>
> The clang_analyzer complains as follows:
>
> Value stored to 'offset' is never read
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
I've said the same things before, and I'll say them again.
Having an unused variable like this could be an indication of a bug
introduced by an earlier change; maybe we should still be using the
variable but no longer do. Please figure out when the variable became
unused and reference the commit so we can tell.
If cgel.zte@gmail.com sends the patches, we'll need their name and
Signed-off-by too.
Thanks for the report, but I'll consider this as a report only.
BR,
Jani.
> ---
> drivers/gpu/drm/i915/display/i9xx_plane.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/i9xx_plane.c b/drivers/gpu/drm/i915/display/i9xx_plane.c
> index b1439ba..a478b7f 100644
> --- a/drivers/gpu/drm/i915/display/i9xx_plane.c
> +++ b/drivers/gpu/drm/i915/display/i9xx_plane.c
> @@ -964,7 +964,7 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
> struct intel_plane *plane = to_intel_plane(crtc->base.primary);
> enum i9xx_plane_id i9xx_plane = plane->i9xx_plane;
> enum pipe pipe;
> - u32 val, base, offset;
> + u32 val, base;
> int fourcc, pixel_format;
> unsigned int aligned_height;
> struct drm_framebuffer *fb;
> @@ -1006,14 +1006,14 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
> fb->format = drm_format_info(fourcc);
>
> if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
> - offset = intel_de_read(dev_priv, DSPOFFSET(i9xx_plane));
> + intel_de_read(dev_priv, DSPOFFSET(i9xx_plane));
> base = intel_de_read(dev_priv, DSPSURF(i9xx_plane)) & 0xfffff000;
> } else if (DISPLAY_VER(dev_priv) >= 4) {
> if (plane_config->tiling)
> - offset = intel_de_read(dev_priv,
> + intel_de_read(dev_priv,
> DSPTILEOFF(i9xx_plane));
> else
> - offset = intel_de_read(dev_priv,
> + intel_de_read(dev_priv,
> DSPLINOFF(i9xx_plane));
> base = intel_de_read(dev_priv, DSPSURF(i9xx_plane)) & 0xfffff000;
> } else {
--
Jani Nikula, Intel Open Source Graphics Center
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: cgel.zte@gmail.com
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org,
luo penghao <luo.penghao@zte.com.cn>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH linux-next] drm/i915/display: Remove the useless variable offset and its assignment
Date: Wed, 08 Dec 2021 10:40:49 +0200 [thread overview]
Message-ID: <87y24v4hgu.fsf@intel.com> (raw)
In-Reply-To: <20211208074952.404381-1-luo.penghao@zte.com.cn>
On Wed, 08 Dec 2021, cgel.zte@gmail.com wrote:
> From: luo penghao <luo.penghao@zte.com.cn>
>
> The existence of offset is meaningless, so it should be deleted.
>
> The clang_analyzer complains as follows:
>
> Value stored to 'offset' is never read
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
I've said the same things before, and I'll say them again.
Having an unused variable like this could be an indication of a bug
introduced by an earlier change; maybe we should still be using the
variable but no longer do. Please figure out when the variable became
unused and reference the commit so we can tell.
If cgel.zte@gmail.com sends the patches, we'll need their name and
Signed-off-by too.
Thanks for the report, but I'll consider this as a report only.
BR,
Jani.
> ---
> drivers/gpu/drm/i915/display/i9xx_plane.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/i9xx_plane.c b/drivers/gpu/drm/i915/display/i9xx_plane.c
> index b1439ba..a478b7f 100644
> --- a/drivers/gpu/drm/i915/display/i9xx_plane.c
> +++ b/drivers/gpu/drm/i915/display/i9xx_plane.c
> @@ -964,7 +964,7 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
> struct intel_plane *plane = to_intel_plane(crtc->base.primary);
> enum i9xx_plane_id i9xx_plane = plane->i9xx_plane;
> enum pipe pipe;
> - u32 val, base, offset;
> + u32 val, base;
> int fourcc, pixel_format;
> unsigned int aligned_height;
> struct drm_framebuffer *fb;
> @@ -1006,14 +1006,14 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
> fb->format = drm_format_info(fourcc);
>
> if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
> - offset = intel_de_read(dev_priv, DSPOFFSET(i9xx_plane));
> + intel_de_read(dev_priv, DSPOFFSET(i9xx_plane));
> base = intel_de_read(dev_priv, DSPSURF(i9xx_plane)) & 0xfffff000;
> } else if (DISPLAY_VER(dev_priv) >= 4) {
> if (plane_config->tiling)
> - offset = intel_de_read(dev_priv,
> + intel_de_read(dev_priv,
> DSPTILEOFF(i9xx_plane));
> else
> - offset = intel_de_read(dev_priv,
> + intel_de_read(dev_priv,
> DSPLINOFF(i9xx_plane));
> base = intel_de_read(dev_priv, DSPSURF(i9xx_plane)) & 0xfffff000;
> } else {
--
Jani Nikula, Intel Open Source Graphics Center
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: cgel.zte@gmail.com
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Stephen Rothwell <sfr@canb.auug.org.au>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org,
luo penghao <luo.penghao@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH linux-next] drm/i915/display: Remove the useless variable offset and its assignment
Date: Wed, 08 Dec 2021 10:40:49 +0200 [thread overview]
Message-ID: <87y24v4hgu.fsf@intel.com> (raw)
In-Reply-To: <20211208074952.404381-1-luo.penghao@zte.com.cn>
On Wed, 08 Dec 2021, cgel.zte@gmail.com wrote:
> From: luo penghao <luo.penghao@zte.com.cn>
>
> The existence of offset is meaningless, so it should be deleted.
>
> The clang_analyzer complains as follows:
>
> Value stored to 'offset' is never read
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: luo penghao <luo.penghao@zte.com.cn>
I've said the same things before, and I'll say them again.
Having an unused variable like this could be an indication of a bug
introduced by an earlier change; maybe we should still be using the
variable but no longer do. Please figure out when the variable became
unused and reference the commit so we can tell.
If cgel.zte@gmail.com sends the patches, we'll need their name and
Signed-off-by too.
Thanks for the report, but I'll consider this as a report only.
BR,
Jani.
> ---
> drivers/gpu/drm/i915/display/i9xx_plane.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/i9xx_plane.c b/drivers/gpu/drm/i915/display/i9xx_plane.c
> index b1439ba..a478b7f 100644
> --- a/drivers/gpu/drm/i915/display/i9xx_plane.c
> +++ b/drivers/gpu/drm/i915/display/i9xx_plane.c
> @@ -964,7 +964,7 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
> struct intel_plane *plane = to_intel_plane(crtc->base.primary);
> enum i9xx_plane_id i9xx_plane = plane->i9xx_plane;
> enum pipe pipe;
> - u32 val, base, offset;
> + u32 val, base;
> int fourcc, pixel_format;
> unsigned int aligned_height;
> struct drm_framebuffer *fb;
> @@ -1006,14 +1006,14 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
> fb->format = drm_format_info(fourcc);
>
> if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
> - offset = intel_de_read(dev_priv, DSPOFFSET(i9xx_plane));
> + intel_de_read(dev_priv, DSPOFFSET(i9xx_plane));
> base = intel_de_read(dev_priv, DSPSURF(i9xx_plane)) & 0xfffff000;
> } else if (DISPLAY_VER(dev_priv) >= 4) {
> if (plane_config->tiling)
> - offset = intel_de_read(dev_priv,
> + intel_de_read(dev_priv,
> DSPTILEOFF(i9xx_plane));
> else
> - offset = intel_de_read(dev_priv,
> + intel_de_read(dev_priv,
> DSPLINOFF(i9xx_plane));
> base = intel_de_read(dev_priv, DSPSURF(i9xx_plane)) & 0xfffff000;
> } else {
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2021-12-08 8:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 7:49 [Intel-gfx] [PATCH linux-next] drm/i915/display: Remove the useless variable offset and its assignment cgel.zte
2021-12-08 7:49 ` cgel.zte
2021-12-08 7:49 ` cgel.zte
2021-12-08 8:40 ` Jani Nikula [this message]
2021-12-08 8:40 ` Jani Nikula
2021-12-08 8:40 ` Jani Nikula
2021-12-08 14:58 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2021-12-08 15:35 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-12-08 19:40 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
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=87y24v4hgu.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@linux.ie \
--cc=cgel.zte@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luo.penghao@zte.com.cn \
--cc=sfr@canb.auug.org.au \
--cc=zealci@zte.com.cn \
/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.