* [PATCH] drm/nouveau: fix returnvar.cocci warning
@ 2022-04-25 11:47 ` Guo Zhengkui
0 siblings, 0 replies; 4+ messages in thread
From: Guo Zhengkui @ 2022-04-25 11:47 UTC (permalink / raw)
To: Ben Skeggs, Karol Herbst, Lyude Paul, David Airlie,
Daniel Vetter, Guo Zhengkui,
open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS,
open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS, open list
Cc: zhengkui_guo
Fix the following coccicheck warning:
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c:71:5-12:
Unneeded variable: "disable". Return "0ULL" on line 85.
Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
---
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
index dc026ac1b595..3d0ab86c3115 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
@@ -68,7 +68,6 @@ gt215_devinit_disable(struct nvkm_devinit *init)
struct nvkm_device *device = init->subdev.device;
u32 r001540 = nvkm_rd32(device, 0x001540);
u32 r00154c = nvkm_rd32(device, 0x00154c);
- u64 disable = 0ULL;
if (!(r001540 & 0x40000000)) {
nvkm_subdev_disable(device, NVKM_ENGINE_MSPDEC, 0);
@@ -82,7 +81,7 @@ gt215_devinit_disable(struct nvkm_devinit *init)
if (!(r00154c & 0x00000200))
nvkm_subdev_disable(device, NVKM_ENGINE_CE, 0);
- return disable;
+ return 0ULL;
}
static u32
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Nouveau] [PATCH] drm/nouveau: fix returnvar.cocci warning
@ 2022-04-25 11:47 ` Guo Zhengkui
0 siblings, 0 replies; 4+ messages in thread
From: Guo Zhengkui @ 2022-04-25 11:47 UTC (permalink / raw)
To: Ben Skeggs, Karol Herbst, Lyude Paul, David Airlie,
Daniel Vetter, Guo Zhengkui,
open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS,
open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS, open list
Cc: zhengkui_guo
Fix the following coccicheck warning:
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c:71:5-12:
Unneeded variable: "disable". Return "0ULL" on line 85.
Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
---
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
index dc026ac1b595..3d0ab86c3115 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
@@ -68,7 +68,6 @@ gt215_devinit_disable(struct nvkm_devinit *init)
struct nvkm_device *device = init->subdev.device;
u32 r001540 = nvkm_rd32(device, 0x001540);
u32 r00154c = nvkm_rd32(device, 0x00154c);
- u64 disable = 0ULL;
if (!(r001540 & 0x40000000)) {
nvkm_subdev_disable(device, NVKM_ENGINE_MSPDEC, 0);
@@ -82,7 +81,7 @@ gt215_devinit_disable(struct nvkm_devinit *init)
if (!(r00154c & 0x00000200))
nvkm_subdev_disable(device, NVKM_ENGINE_CE, 0);
- return disable;
+ return 0ULL;
}
static u32
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Nouveau] [PATCH] drm/nouveau: fix returnvar.cocci warning
2022-04-25 11:47 ` [Nouveau] " Guo Zhengkui
@ 2022-04-26 18:15 ` Lyude Paul
-1 siblings, 0 replies; 4+ messages in thread
From: Lyude Paul @ 2022-04-26 18:15 UTC (permalink / raw)
To: Guo Zhengkui, Ben Skeggs, Karol Herbst, David Airlie,
Daniel Vetter,
open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS,
open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS, open list
Cc: zhengkui_guo
Reviewed-by: Lyude Paul <lyude@redhat.com>
Will push upstream in a moment
On Mon, 2022-04-25 at 19:47 +0800, Guo Zhengkui wrote:
> Fix the following coccicheck warning:
> drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c:71:5-12:
> Unneeded variable: "disable". Return "0ULL" on line 85.
>
> Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
> ---
> drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
> b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
> index dc026ac1b595..3d0ab86c3115 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
> @@ -68,7 +68,6 @@ gt215_devinit_disable(struct nvkm_devinit *init)
> struct nvkm_device *device = init->subdev.device;
> u32 r001540 = nvkm_rd32(device, 0x001540);
> u32 r00154c = nvkm_rd32(device, 0x00154c);
> - u64 disable = 0ULL;
>
> if (!(r001540 & 0x40000000)) {
> nvkm_subdev_disable(device, NVKM_ENGINE_MSPDEC, 0);
> @@ -82,7 +81,7 @@ gt215_devinit_disable(struct nvkm_devinit *init)
> if (!(r00154c & 0x00000200))
> nvkm_subdev_disable(device, NVKM_ENGINE_CE, 0);
>
> - return disable;
> + return 0ULL;
> }
>
> static u32
--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/nouveau: fix returnvar.cocci warning
@ 2022-04-26 18:15 ` Lyude Paul
0 siblings, 0 replies; 4+ messages in thread
From: Lyude Paul @ 2022-04-26 18:15 UTC (permalink / raw)
To: Guo Zhengkui, Ben Skeggs, Karol Herbst, David Airlie,
Daniel Vetter,
open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS,
open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS, open list
Cc: zhengkui_guo
Reviewed-by: Lyude Paul <lyude@redhat.com>
Will push upstream in a moment
On Mon, 2022-04-25 at 19:47 +0800, Guo Zhengkui wrote:
> Fix the following coccicheck warning:
> drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c:71:5-12:
> Unneeded variable: "disable". Return "0ULL" on line 85.
>
> Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
> ---
> drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
> b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
> index dc026ac1b595..3d0ab86c3115 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c
> @@ -68,7 +68,6 @@ gt215_devinit_disable(struct nvkm_devinit *init)
> struct nvkm_device *device = init->subdev.device;
> u32 r001540 = nvkm_rd32(device, 0x001540);
> u32 r00154c = nvkm_rd32(device, 0x00154c);
> - u64 disable = 0ULL;
>
> if (!(r001540 & 0x40000000)) {
> nvkm_subdev_disable(device, NVKM_ENGINE_MSPDEC, 0);
> @@ -82,7 +81,7 @@ gt215_devinit_disable(struct nvkm_devinit *init)
> if (!(r00154c & 0x00000200))
> nvkm_subdev_disable(device, NVKM_ENGINE_CE, 0);
>
> - return disable;
> + return 0ULL;
> }
>
> static u32
--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-08 3:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-25 11:47 [PATCH] drm/nouveau: fix returnvar.cocci warning Guo Zhengkui
2022-04-25 11:47 ` [Nouveau] " Guo Zhengkui
2022-04-26 18:15 ` Lyude Paul
2022-04-26 18:15 ` Lyude Paul
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.