* [PATCH linux-next] drm/nouveau/mmu: drop unneeded assignment in the nvkm_uvmm_mthd_page()
@ 2021-08-21 2:11 CGEL
2021-09-28 11:14 ` Karol Herbst
0 siblings, 1 reply; 2+ messages in thread
From: CGEL @ 2021-08-21 2:11 UTC (permalink / raw)
To: Ben Skeggs
Cc: David Airlie, Daniel Vetter, dri-devel, nouveau, linux-kernel,
Luo penghao, Zeal Robot
From: Luo penghao <luo.penghao@zte.com.cn>
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>
---
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c
index c43b824..d9f8e11 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c
@@ -314,7 +314,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;
--
2.15.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH linux-next] drm/nouveau/mmu: drop unneeded assignment in the nvkm_uvmm_mthd_page()
2021-08-21 2:11 [PATCH linux-next] drm/nouveau/mmu: drop unneeded assignment in the nvkm_uvmm_mthd_page() CGEL
@ 2021-09-28 11:14 ` Karol Herbst
0 siblings, 0 replies; 2+ messages in thread
From: Karol Herbst @ 2021-09-28 11:14 UTC (permalink / raw)
To: CGEL
Cc: Ben Skeggs, David Airlie, Daniel Vetter, dri-devel, nouveau,
LKML, Luo penghao, Zeal Robot
Reviewed-by: Karol Herbst <kherbst@redhat.com>
On Sat, Aug 21, 2021 at 10:46 AM CGEL <cgel.zte@gmail.com> wrote:
>
> From: Luo penghao <luo.penghao@zte.com.cn>
>
> 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>
> ---
> drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c
> index c43b824..d9f8e11 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/uvmm.c
> @@ -314,7 +314,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;
> --
> 2.15.2
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-28 11:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-21 2:11 [PATCH linux-next] drm/nouveau/mmu: drop unneeded assignment in the nvkm_uvmm_mthd_page() CGEL
2021-09-28 11:14 ` Karol Herbst
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).