Skip to contentSkip to conversation

nouveau/nvkm/subdev/devinit/mcp89.c:Unneeded variable

PATCH In review ChunyouTang 2 participants 2 messages Mar 17, 2021 – Mar 24, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nouveau/nvkm/subdev/devinit/mcp89.c:Unneeded variable

From: tangchunyou <[email protected]>

disable,delete disable and return 0

---
 drivers/gpu/drm/nouveau/nvkm/subdev/devinit/mcp89.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/mcp89.c +1 -2
index fb90d47..a9cdf24 100644
@@ -32,7 +32,6 @@
 	struct nvkm_device *device = init->subdev.device;
 	u32 r001540 = nvkm_rd32(device, 0x001540);
 	u32 r00154c = nvkm_rd32(device, 0x00154c);
-	u64 disable = 0;
 
 	if (!(r001540 & 0x40000000)) {
 		nvkm_subdev_disable(device, NVKM_ENGINE_MSPDEC, 0);
@@ -48,7 +47,7 @@
 	if (!(r00154c & 0x00000200))
 		nvkm_subdev_disable(device, NVKM_ENGINE_CE, 0);
 
-	return disable;
+	return 0;
 }
 
 static const struct nvkm_devinit_func
Signature · 7 lines
1.9.1


_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 6 lines · ChunyouTang

From: tangchunyou <[email protected]>

disable,delete disable and return 0

Thanks!

Quoted 29 lines
---
 drivers/gpu/drm/nouveau/nvkm/subdev/devinit/mcp89.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/mcp89.c +1 -3
index fb90d47..a9cdf24 100644
@@ -32,7 +32,6 @@
        struct nvkm_device *device = init->subdev.device;
        u32 r001540 = nvkm_rd32(device, 0x001540);
        u32 r00154c = nvkm_rd32(device, 0x00154c);
-       u64 disable = 0;
 
        if (!(r001540 & 0x40000000)) {
                nvkm_subdev_disable(device, NVKM_ENGINE_MSPDEC, 0);
@@ -48,7 +47,7 @@
        if (!(r00154c & 0x00000200))
                nvkm_subdev_disable(device, NVKM_ENGINE_CE, 0);
 
-       return disable;
+       return 0;
 }
 
 static const struct nvkm_devinit_func
--

1.9.1

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau