Skip to contentSkip to conversation

core: remove unused variables detected by Clang

PATCH In review Samuel Pitoiset 2 participants 2 messages Aug 26, 2015 – Aug 27, 2015 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 core: remove unused variables detected by Clang

These variables have been left since the recent big merge.

---
 drm/nouveau/nvkm/engine/device/base.c | 4 ----
 drm/nouveau/nvkm/engine/dma/base.c    | 5 -----
 drm/nouveau/nvkm/engine/sw/base.c     | 5 -----
 3 files changed, 14 deletions(-)
drm/nouveau/nvkm/engine/device/base.c +0 -4
index 952a508..a32ac99 100644
@@ -2291,10 +2291,6 @@ nvkm_device_del(struct nvkm_device **pdevice)
 	}
 }
 
-static const struct nvkm_engine_func
-nvkm_device_func = {
-};
-
 int
 nvkm_device_ctor(const struct nvkm_device_func *func,
 		 const struct nvkm_device_quirk *quirk,
drm/nouveau/nvkm/engine/dma/base.c +0 -5
index c1957ce..9769fc0 100644
@@ -97,11 +97,6 @@ nvkm_dma_oclass_fifo_new(const struct nvkm_oclass *oclass, void *data, u32 size,
 }
 
 static const struct nvkm_sclass
-nvkm_dma_oclass_fifo = {
-	.ctor = nvkm_dma_oclass_fifo_new,
-};
-
-static const struct nvkm_sclass
 nvkm_dma_sclass[] = {
 	{ 0, 0, NV_DMA_FROM_MEMORY, NULL, nvkm_dma_oclass_fifo_new },
 	{ 0, 0, NV_DMA_TO_MEMORY, NULL, nvkm_dma_oclass_fifo_new },
drm/nouveau/nvkm/engine/sw/base.c +0 -5
index d46f229..53c1f7e 100644
@@ -55,11 +55,6 @@ nvkm_sw_oclass_new(const struct nvkm_oclass *oclass, void *data, u32 size,
 	return sclass->ctor(chan, oclass, data, size, pobject);
 }
 
-static const struct nvkm_sclass
-nvkm_sw_oclass = {
-	.ctor = nvkm_sw_oclass_new,
-};
-
 static int
 nvkm_sw_oclass_get(struct nvkm_oclass *oclass, int index)
 {
Signature · 6 lines
2.5.0

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

A message that is not in the archive (sent off-list or not yet received): 1440621169-3036-1-git-send-email-samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw
Quoted 1 line · Samuel Pitoiset

These variables have been left since the recent big merge.

Hey Samuel,

These were mostly bits and pieces left over from an older revision of the rework, I've squashed the bits back into the commits that caused them.

Thanks,
Ben.

Quoted 58 lines
---
 drm/nouveau/nvkm/engine/device/base.c | 4 ----
 drm/nouveau/nvkm/engine/dma/base.c    | 5 -----
 drm/nouveau/nvkm/engine/sw/base.c     | 5 -----
 3 files changed, 14 deletions(-)
drm/nouveau/nvkm/engine/device/base.c +0 -4
index 952a508..a32ac99 100644
@@ -2291,10 +2291,6 @@ nvkm_device_del(struct nvkm_device **pdevice)
        }
 }
 
-static const struct nvkm_engine_func
-nvkm_device_func = {
-};
-
 int
 nvkm_device_ctor(const struct nvkm_device_func *func,
                 const struct nvkm_device_quirk *quirk,
drm/nouveau/nvkm/engine/dma/base.c +0 -5
index c1957ce..9769fc0 100644
@@ -97,11 +97,6 @@ nvkm_dma_oclass_fifo_new(const struct nvkm_oclass *oclass, void *data, u32 size,
 }
 
 static const struct nvkm_sclass
-nvkm_dma_oclass_fifo = {
-       .ctor = nvkm_dma_oclass_fifo_new,
-};
-
-static const struct nvkm_sclass
 nvkm_dma_sclass[] = {
        { 0, 0, NV_DMA_FROM_MEMORY, NULL, nvkm_dma_oclass_fifo_new },
        { 0, 0, NV_DMA_TO_MEMORY, NULL, nvkm_dma_oclass_fifo_new },
drm/nouveau/nvkm/engine/sw/base.c +0 -6
index d46f229..53c1f7e 100644
@@ -55,11 +55,6 @@ nvkm_sw_oclass_new(const struct nvkm_oclass *oclass, void *data, u32 size,
        return sclass->ctor(chan, oclass, data, size, pobject);
 }
 
-static const struct nvkm_sclass
-nvkm_sw_oclass = {
-       .ctor = nvkm_sw_oclass_new,
-};
-
 static int
 nvkm_sw_oclass_get(struct nvkm_oclass *oclass, int index)
 {
--

2.5.0

Quoted 4 lines

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

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