From: Jani Nikula <jani.nikula@linux.intel.com>
To: zhangshida <starzhangzsd@gmail.com>,
joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com,
tvrtko.ursulin@linux.intel.com, airlied@gmail.com,
daniel@ffwll.ch, ville.syrjala@linux.intel.com
Cc: k2ci <kernel-bot@kylinos.cn>,
intel-gfx@lists.freedesktop.org, starzhangzsd@gmail.com,
zhangshida@kylinos.cn, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gmch: fix not used warning in intel_alloc_mchbar_resource
Date: Tue, 11 Jul 2023 10:26:08 +0300 [thread overview]
Message-ID: <87ilaqj4dr.fsf@intel.com> (raw)
In-Reply-To: <20230711032940.901797-1-zhangshida@kylinos.cn>
On Tue, 11 Jul 2023, zhangshida <starzhangzsd@gmail.com> wrote:
> From: Shida Zhang <zhangshida@kylinos.cn>
>
> Quiet down this gcc warning generated by
> gcc (Debian 10.2.1-6) 10.2.1 20210110:
>
> ../drivers/gpu/drm/i915/soc/intel_gmch.c: In function ‘intel_alloc_mchbar_resource’:
> ../drivers/gpu/drm/i915/soc/intel_gmch.c:41:6: error: variable ‘mchbar_addr’ set but not used [-Werror=unused-but-set-variable]
> 41 | u64 mchbar_addr;
> | ^~~~~~~~~~~
>
> Reported-by: k2ci <kernel-bot@kylinos.cn>
> Signed-off-by: Shida Zhang <zhangshida@kylinos.cn>
Thanks, but this is already fixed by commit b02a9a0c6cb3
("drm/i915/gmch: avoid unused variable warning").
BR,
Jani.
> ---
> drivers/gpu/drm/i915/soc/intel_gmch.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/soc/intel_gmch.c b/drivers/gpu/drm/i915/soc/intel_gmch.c
> index 6d0204942f7a..f7db6cb3f828 100644
> --- a/drivers/gpu/drm/i915/soc/intel_gmch.c
> +++ b/drivers/gpu/drm/i915/soc/intel_gmch.c
> @@ -38,16 +38,18 @@ intel_alloc_mchbar_resource(struct drm_i915_private *i915)
> {
> int reg = GRAPHICS_VER(i915) >= 4 ? MCHBAR_I965 : MCHBAR_I915;
> u32 temp_lo, temp_hi = 0;
> +#ifdef CONFIG_PNP
> u64 mchbar_addr;
> +#endif
> int ret;
>
> if (GRAPHICS_VER(i915) >= 4)
> pci_read_config_dword(i915->gmch.pdev, reg + 4, &temp_hi);
> pci_read_config_dword(i915->gmch.pdev, reg, &temp_lo);
> - mchbar_addr = ((u64)temp_hi << 32) | temp_lo;
>
> /* If ACPI doesn't have it, assume we need to allocate it ourselves */
> #ifdef CONFIG_PNP
> + mchbar_addr = ((u64)temp_hi << 32) | temp_lo;
> if (mchbar_addr &&
> pnp_range_reserved(mchbar_addr, mchbar_addr + MCHBAR_SIZE))
> return 0;
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2023-07-11 7:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 3:29 [Intel-gfx] [PATCH] drm/i915/gmch: fix not used warning in intel_alloc_mchbar_resource zhangshida
2023-07-11 7:26 ` Jani Nikula [this message]
2023-07-11 15:07 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " 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=87ilaqj4dr.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=kernel-bot@kylinos.cn \
--cc=rodrigo.vivi@intel.com \
--cc=starzhangzsd@gmail.com \
--cc=tvrtko.ursulin@linux.intel.com \
--cc=ville.syrjala@linux.intel.com \
--cc=zhangshida@kylinos.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox