Skip to contentSkip to conversation

drm/nouveau/mc/ga100: make ga100_mc_device static

PATCH In review Ben Dooks 2 participants 2 messages Dec 31, 2022 – Apr 11, 2023

Subsystems (3)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 drm/nouveau/mc/ga100: make ga100_mc_device static

Make ga100_mc_device static as it isn't exported, to fix the following sparse warning:

drivers/gpu/drm/nouveau/nvkm/subdev/mc/ga100.c:51:1: warning: symbol 'ga100_mc_device' was not declared. Should it be static?

---
 drivers/gpu/drm/nouveau/nvkm/subdev/mc/ga100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/subdev/mc/ga100.c +1 -1
index 1e2eabec1a76..5d28d30d09d5 100644
@@ -47,7 +47,7 @@ ga100_mc_device_enabled(struct nvkm_mc *mc, u32 mask)
 	return (nvkm_rd32(mc->subdev.device, 0x000600) & mask) == mask;
 }
 
-const struct nvkm_mc_device_func
+static const struct nvkm_mc_device_func
 ga100_mc_device = {
 	.enabled = ga100_mc_device_enabled,
 	.enable = ga100_mc_device_enable,
Signature · 1 line
2.39.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 27 lines · Ben Dooks

Make ga100_mc_device static as it isn't exported, to fix the following sparse warning:

drivers/gpu/drm/nouveau/nvkm/subdev/mc/ga100.c:51:1: warning: symbol 'ga100_mc_device' was not declared. Should it be static?

---
 drivers/gpu/drm/nouveau/nvkm/subdev/mc/ga100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/subdev/mc/ga100.c +1 -2
index 1e2eabec1a76..5d28d30d09d5 100644
@@ -47,7 +47,7 @@ ga100_mc_device_enabled(struct nvkm_mc *mc, u32 mask)
        return (nvkm_rd32(mc->subdev.device, 0x000600) & mask) == mask;
 }
 
-const struct nvkm_mc_device_func
+static const struct nvkm_mc_device_func
 ga100_mc_device = {
        .enabled = ga100_mc_device_enabled,
        .enable = ga100_mc_device_enable,
--

2.39.0