Skip to content

Commit

Permalink
drm/nouveau/mmu: drop unneeded assignment in the nvkm_uvmm_mthd_page()
Browse files Browse the repository at this point in the history
In order to keep the code style consistency of the whole file,
the 'ret' assignments should be deleted.

The clang_analyzer complains as follows:

drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c:317:8:warning:
Although the value storedto 'ret' is used in the enclosing expression,
the value is never actually read from 'ret'.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Luo penghao <luo.penghao@zte.com.cn>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210821021106.27010-1-luo.penghao@zte.com.cn
  • Loading branch information
Luo penghao authored and Karol Herbst committed Oct 11, 2021
1 parent cacadb0 commit 6363185
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ nvkm_uvmm_mthd_page(struct nvkm_uvmm *uvmm, void *argv, u32 argc)
page = uvmm->vmm->func->page;
for (nr = 0; page[nr].shift; nr++);

if (!(ret = nvif_unpack(ret, &argv, &argc, args->v0, 0, 0, false))) {
if (!(nvif_unpack(ret, &argv, &argc, args->v0, 0, 0, false))) {
if ((index = args->v0.index) >= nr)
return -EINVAL;
type = page[index].type;
Expand Down

0 comments on commit 6363185

Please sign in to comment.