Skip to contentSkip to conversation

drm/nouveau/gsp: change gv100_gsp from global to static

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

Subsystems (3)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 drm/nouveau/gsp: change gv100_gsp from global to static

Smatch reports this issue
gv100.c:46:1: warning: symbol 'gv100_gsp' was not declared. Should it be static?

gv100_gsp is only used in gv100.c so change its
storage-class specifier to static.

---
 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/gv100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/gv100.c +1 -1
index 2ac7fc934c09..6c4ef62a746a 100644
@@ -42,7 +42,7 @@ gv100_gsp_nofw(struct nvkm_gsp *gsp, int ver, const struct nvkm_gsp_fwif *fwif)
 	return 0;
 }
 
-struct nvkm_gsp_fwif
+static struct nvkm_gsp_fwif
 gv100_gsp[] = {
 	{ -1, gv100_gsp_nofw, &gv100_gsp_flcn },
 	{}
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

Smatch reports this issue
gv100.c:46:1: warning: symbol 'gv100_gsp' was not declared. Should it be static?

gv100_gsp is only used in gv100.c so change its
storage-class specifier to static.

---
 drivers/gpu/drm/nouveau/nvkm/subdev/gsp/gv100.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/gv100.c +0 -0
index 2ac7fc934c09..6c4ef62a746a 100644
@@ -42,7 +42,7 @@ gv100_gsp_nofw(struct nvkm_gsp *gsp, int ver, const struct
 nvkm_gsp_fwif *fwif)
         return 0;
  }

drivers/gpu/drm/nouveau/nvkm/subdev/gsp/gv100.c +1 -1
-struct nvkm_gsp_fwif
+static struct nvkm_gsp_fwif

 gv100_gsp[] = {
        { -1, gv100_gsp_nofw, &gv100_gsp_flcn },
        {}

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