All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/msm: remove an unused-but-set variable
@ 2024-04-05 15:58 Arnd Bergmann
  2024-04-05 18:20 ` Dmitry Baryshkov
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2024-04-05 15:58 UTC (permalink / raw)
  To: Rob Clark, Abhinav Kumar, Dmitry Baryshkov
  Cc: Arnd Bergmann, Sean Paul, Marijn Suijten, David Airlie,
	Daniel Vetter, Konrad Dybcio, Connor Abbott, linux-arm-msm,
	dri-devel, freedreno, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The modification to a6xx_get_shader_block() had no effect other
than causing a warning:

drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:843:6: error: variable 'out' set but not used [-Werror,-Wunused-but-set-variable]
        u64 out = dumper->iova + A6XX_CD_DATA_OFFSET;

Revert this part of the previous patch.

Fixes: 64d6255650d4 ("drm/msm: More fully implement devcoredump for a7xx")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
index 1f5245fc2cdc..d4e1ebfcb021 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
@@ -840,7 +840,6 @@ static void a6xx_get_shader_block(struct msm_gpu *gpu,
 		struct a6xx_crashdumper *dumper)
 {
 	u64 *in = dumper->ptr;
-	u64 out = dumper->iova + A6XX_CD_DATA_OFFSET;
 	size_t datasize = block->size * A6XX_NUM_SHADER_BANKS * sizeof(u32);
 	int i;
 
@@ -853,8 +852,6 @@ static void a6xx_get_shader_block(struct msm_gpu *gpu,
 
 		in += CRASHDUMP_READ(in, REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE,
 			block->size, dumper->iova + A6XX_CD_DATA_OFFSET);
-
-		out += block->size * sizeof(u32);
 	}
 
 	CRASHDUMP_FINI(in);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/msm: remove an unused-but-set variable
  2024-04-05 15:58 [PATCH] drm/msm: remove an unused-but-set variable Arnd Bergmann
@ 2024-04-05 18:20 ` Dmitry Baryshkov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Baryshkov @ 2024-04-05 18:20 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Rob Clark, Abhinav Kumar, Arnd Bergmann, Sean Paul,
	Marijn Suijten, David Airlie, Daniel Vetter, Konrad Dybcio,
	Connor Abbott, linux-arm-msm, dri-devel, freedreno, linux-kernel

On Fri, 5 Apr 2024 at 18:59, Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> The modification to a6xx_get_shader_block() had no effect other
> than causing a warning:
>
> drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:843:6: error: variable 'out' set but not used [-Werror,-Wunused-but-set-variable]
>         u64 out = dumper->iova + A6XX_CD_DATA_OFFSET;
>
> Revert this part of the previous patch.
>
> Fixes: 64d6255650d4 ("drm/msm: More fully implement devcoredump for a7xx")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Unfortunately this fix is not correct. The proper patch is present at
https://patchwork.freedesktop.org/patch/584955/?series=131663&rev=1

> ---
>  drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
> index 1f5245fc2cdc..d4e1ebfcb021 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
> @@ -840,7 +840,6 @@ static void a6xx_get_shader_block(struct msm_gpu *gpu,
>                 struct a6xx_crashdumper *dumper)
>  {
>         u64 *in = dumper->ptr;
> -       u64 out = dumper->iova + A6XX_CD_DATA_OFFSET;
>         size_t datasize = block->size * A6XX_NUM_SHADER_BANKS * sizeof(u32);
>         int i;
>
> @@ -853,8 +852,6 @@ static void a6xx_get_shader_block(struct msm_gpu *gpu,
>
>                 in += CRASHDUMP_READ(in, REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE,
>                         block->size, dumper->iova + A6XX_CD_DATA_OFFSET);
> -
> -               out += block->size * sizeof(u32);
>         }
>
>         CRASHDUMP_FINI(in);
> --
> 2.39.2
>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-05 18:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-05 15:58 [PATCH] drm/msm: remove an unused-but-set variable Arnd Bergmann
2024-04-05 18:20 ` Dmitry Baryshkov

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.