]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/msm: fix the `CRASHDUMP_READ` target of `a6xx_get_shader_block()`
authorMiguel Ojeda <ojeda@kernel.org>
Tue, 26 Mar 2024 21:23:24 +0000 (22:23 +0100)
committerRob Clark <robdclark@chromium.org>
Fri, 5 Apr 2024 18:21:26 +0000 (11:21 -0700)
commitd3bbc4dfcc8d436b1e27a0bb6a5893b090fc1cab
treeb1b1dd2ce697a443c4ad73f3724ba62702bb36ff
parentbe1b7acb929137e3943fe380671242beb485190c
drm/msm: fix the `CRASHDUMP_READ` target of `a6xx_get_shader_block()`

Clang 14 in an (essentially) defconfig arm64 build for next-20240326
reports [1]:

    drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:843:6: error:
    variable 'out' set but not used [-Werror,-Wunused-but-set-variable]

The variable `out` in these functions is meant to compute the `target` of
`CRASHDUMP_READ()`, but in this case only the initial value (`dumper->iova
+ A6XX_CD_DATA_OFFSET`) was being passed.

Thus use `out` as it was intended by Connor [2].

There was an alternative patch at [3] that removed the variable
altogether, but that would only use the initial value.

Fixes: 64d6255650d4 ("drm/msm: More fully implement devcoredump for a7xx")
Closes: https://lore.kernel.org/lkml/CANiq72mjc5t4n25SQvYSrOEhxxpXYPZ4pPzneSJHEnc3qApu2Q@mail.gmail.com/ [1]
Link: https://lore.kernel.org/lkml/CACu1E7HhCKMJd6fixZSPiNAz6ekoZnkMTHTcLFVmbZ-9VoLxKg@mail.gmail.com/
Link: https://lore.kernel.org/lkml/20240307093727.1978126-1-colin.i.king@gmail.com/
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/584955/
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c