Skip to contentSkip to conversation

drm/nouveau/kms/gv100: use static for gv100_disp_core_mthd_[base|sor]

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

Subsystems (3)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 drm/nouveau/kms/gv100: use static for gv100_disp_core_mthd_[base|sor]

Sparse reports these issues
coregv100.c:27:1: warning: symbol 'gv100_disp_core_mthd_base' was not declared. Should it be static? coregv100.c:43:1: warning: symbol 'gv100_disp_core_mthd_sor' was not declared. Should it be static?

These variables are only used in coregv100.c. Single file use variables should be static, so add static to their storage-class specifier.

---
 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c +2 -2
index 448a515057c7..1d333c484a49 100644
@@ -23,7 +23,7 @@
 
 #include <subdev/timer.h>
 
-const struct nv50_disp_mthd_list
+static const struct nv50_disp_mthd_list
 gv100_disp_core_mthd_base = {
 	.mthd = 0x0000,
 	.addr = 0x000000,
@@ -39,7 +39,7 @@ gv100_disp_core_mthd_base = {
 	}
 };
 
-const struct nv50_disp_mthd_list
+static const struct nv50_disp_mthd_list
 gv100_disp_core_mthd_sor = {
 	.mthd = 0x0020,
 	.addr = 0x000020,
Signature · 1 line
2.27.0
maintainer Reviewed-by on v1 1/1
#1 lore raw

Will push to the appropriate branch in a bit

Quoted 37 lines · Tom Rix

Sparse reports these issues
coregv100.c:27:1: warning: symbol 'gv100_disp_core_mthd_base' was not declared. Should it be static?
coregv100.c:43:1: warning: symbol 'gv100_disp_core_mthd_sor' was not declared. Should it be static?

These variables are only used in coregv100.c.  Single file use variables should be static, so add static to their storage-class specifier.

---
 drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c | 4 ++--

 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c +0 -0
index 448a515057c7..1d333c484a49 100644
@@ -23,7 +23,7 @@


 #include <subdev/timer.h>

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

 gv100_disp_core_mthd_base = {
        .mthd = 0x0000,
        .addr = 0x000000,

drivers/gpu/drm/nouveau/nvkm/engine/disp/coregv100.c +0 -0
@@ -39,7 +39,7 @@ gv100_disp_core_mthd_base = {
         }
  };

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

 gv100_disp_core_mthd_sor = {
        .mthd = 0x0020,
        .addr = 0x000020,

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