Skip to contentSkip to conversation

drm/nouveau/disp/gv100: make gv100_disp_wimm static

PATCH In review Tom Rix 2 participants 2 messages Apr 25, 2022 – Apr 26, 2022

Subsystems (3)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 drm/nouveau/disp/gv100: make gv100_disp_wimm static

Sparse reports this issue
wimmgv100.c:39:1: warning: symbol 'gv100_disp_wimm' was not declared. Should it be static?

This variable is only used in wimmgv100.c. Single file variables should be static. So use static as its storage-class specifier.

---
 drivers/gpu/drm/nouveau/nvkm/engine/disp/wimmgv100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/engine/disp/wimmgv100.c +1 -1
index 89d783368b4f..bb4db6351ddf 100644
@@ -35,7 +35,7 @@ gv100_disp_wimm_intr(struct nv50_disp_chan *chan, bool en)
 	nvkm_mask(device, 0x611da8, mask, data);
 }
 
-const struct nv50_disp_chan_func
+static const struct nv50_disp_chan_func
 gv100_disp_wimm = {
 	.init = gv100_disp_dmac_init,
 	.fini = gv100_disp_dmac_fini,
Signature · 1 line
2.27.0
maintainer Reviewed-by on v1 1/1
#1 lore raw

Will push upstream in a moment

Quoted 27 lines · Tom Rix

Sparse reports this issue
wimmgv100.c:39:1: warning: symbol 'gv100_disp_wimm' was not declared. Should it be static?

This variable is only used in wimmgv100.c.  Single file variables should be static.
So use static as its storage-class specifier.

---
 drivers/gpu/drm/nouveau/nvkm/engine/disp/wimmgv100.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/engine/disp/wimmgv100.c +0 -0
index 89d783368b4f..bb4db6351ddf 100644
@@ -35,7 +35,7 @@ gv100_disp_wimm_intr(struct nv50_disp_chan *chan, bool en)
         nvkm_mask(device, 0x611da8, mask, data);
  }

drivers/gpu/drm/nouveau/nvkm/engine/disp/wimmgv100.c +1 -1
-const struct nv50_disp_chan_func
+static const struct nv50_disp_chan_func

 gv100_disp_wimm = {
        .init = gv100_disp_dmac_init,
        .fini = gv100_disp_dmac_fini,

Signature · 3 lines
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat