* [PATCH] drm/i915/gmch: fix not used warning in intel_alloc_mchbar_resource
@ 2023-07-11 3:29 ` zhangshida
0 siblings, 0 replies; 5+ messages in thread
From: zhangshida @ 2023-07-11 3:29 UTC (permalink / raw)
To: jani.nikula, joonas.lahtinen, rodrigo.vivi, tvrtko.ursulin,
airlied, daniel, ville.syrjala
Cc: k2ci, intel-gfx, starzhangzsd, zhangshida, dri-devel
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>
---
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;
--
2.27.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Intel-gfx] [PATCH] drm/i915/gmch: fix not used warning in intel_alloc_mchbar_resource
@ 2023-07-11 3:29 ` zhangshida
0 siblings, 0 replies; 5+ messages in thread
From: zhangshida @ 2023-07-11 3:29 UTC (permalink / raw)
To: jani.nikula, joonas.lahtinen, rodrigo.vivi, tvrtko.ursulin,
airlied, daniel, ville.syrjala
Cc: k2ci, intel-gfx, starzhangzsd, zhangshida, dri-devel
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>
---
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;
--
2.27.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915/gmch: fix not used warning in intel_alloc_mchbar_resource
2023-07-11 3:29 ` [Intel-gfx] " zhangshida
@ 2023-07-11 7:26 ` Jani Nikula
-1 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2023-07-11 7:26 UTC (permalink / raw)
To: zhangshida, joonas.lahtinen, rodrigo.vivi, tvrtko.ursulin,
airlied, daniel, ville.syrjala
Cc: k2ci, intel-gfx, starzhangzsd, zhangshida, dri-devel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/gmch: fix not used warning in intel_alloc_mchbar_resource
@ 2023-07-11 7:26 ` Jani Nikula
0 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2023-07-11 7:26 UTC (permalink / raw)
To: zhangshida, joonas.lahtinen, rodrigo.vivi, tvrtko.ursulin,
airlied, daniel, ville.syrjala
Cc: k2ci, intel-gfx, starzhangzsd, zhangshida, dri-devel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/gmch: fix not used warning in intel_alloc_mchbar_resource
2023-07-11 3:29 ` [Intel-gfx] " zhangshida
(?)
(?)
@ 2023-07-11 15:07 ` Patchwork
-1 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2023-07-11 15:07 UTC (permalink / raw)
To: zhangshida; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/gmch: fix not used warning in intel_alloc_mchbar_resource
URL : https://patchwork.freedesktop.org/series/120539/
State : failure
== Summary ==
Error: patch https://patchwork.freedesktop.org/api/1.0/series/120539/revisions/1/mbox/ not applied
Applying: drm/i915/gmch: fix not used warning in intel_alloc_mchbar_resource
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/soc/intel_gmch.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/soc/intel_gmch.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/soc/intel_gmch.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 drm/i915/gmch: fix not used warning in intel_alloc_mchbar_resource
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Build failed, no error log produced
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-07-11 15:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-11 3:29 [PATCH] drm/i915/gmch: fix not used warning in intel_alloc_mchbar_resource zhangshida
2023-07-11 3:29 ` [Intel-gfx] " zhangshida
2023-07-11 7:26 ` Jani Nikula
2023-07-11 7:26 ` [Intel-gfx] " Jani Nikula
2023-07-11 15:07 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork
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.