Skip to contentSkip to conversation

drm/nouveau/gr/gf100-: make undeclared symbols static

PATCH New Ben Dooks 1 participant 5 messages Oct 8, 2019

Subsystems (3)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/5 drm/nouveau/gr/gf100-: make undeclared symbols static

The following functions are not declared outside of the file they are in, so make them static to avoid these warnings:

drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:745:1: warning: symbol 'gf100_gr_fecs_start_ctxsw' was not declared. Should it be static? drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:760:1: warning: symbol 'gf100_gr_fecs_stop_ctxsw' was not declared. Should it be static? drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:2071:1: warning: symbol 'gf100_gr_ctor_fw_legacy' was not declared. Should it be static?

---
 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c +3 -3
index c578deb5867a..f1d1174ce67a 100644
@@ -741,7 +741,7 @@ gf100_gr_fecs_ctrl_ctxsw(struct gf100_gr *gr, u32 mthd)
 	return -ETIMEDOUT;
 }
 
-int
+static int
 gf100_gr_fecs_start_ctxsw(struct nvkm_gr *base)
 {
 	struct gf100_gr *gr = gf100_gr(base);
@@ -756,7 +756,7 @@ gf100_gr_fecs_start_ctxsw(struct nvkm_gr *base)
 	return ret;
 }
 
-int
+static int
 gf100_gr_fecs_stop_ctxsw(struct nvkm_gr *base)
 {
 	struct gf100_gr *gr = gf100_gr(base);
@@ -2067,7 +2067,7 @@ gf100_gr_ = {
 	.ctxsw.inst = gf100_gr_ctxsw_inst,
 };
 
-int
+static int
 gf100_gr_ctor_fw_legacy(struct gf100_gr *gr, const char *fwname,
 			struct gf100_gr_fuc *fuc, int ret)
 {
Signature · 1 line
2.23.0
author
#1 lore raw

PATCH 2/5 drm/nouveau/fifo/tu102: make tu102_fifo_runlist static

The tu102_fifo_runlist is not exorted, so make it static to avoid the following warning:

drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c:47:1: warning: symbol 'tu102_fifo_runlist' was not declared. Should it be static?

---
 drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/engine/fifo/tu102.c +1 -1
index 005f3e1729b9..3e78f5b6accb 100644
@@ -43,7 +43,7 @@ tu102_fifo_runlist_commit(struct gk104_fifo *fifo, int runl,
 	/*XXX: how to wait? can you even wait? */
 }
 
-const struct gk104_fifo_runlist_func
+static const struct gk104_fifo_runlist_func
 tu102_fifo_runlist = {
 	.size = 16,
 	.cgrp = gv100_fifo_runlist_cgrp,
Signature · 1 line
2.23.0
author
#2 lore raw

PATCH 3/5 drm/nouveau/fifo/gv100: make gv100_fifo_runlist static

In reply to Ben Dooks

Do not export gv100_fifo_runlist as it isn't not used to remove the following morning:

drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c:56:1: warning: symbol 'gv100_fifo_runlist' was not declared. Should it be static?

---
 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c +1 -1
index 6ee1bb32a071..1f6ddf880179 100644
@@ -52,7 +52,7 @@ gv100_fifo_runlist_cgrp(struct nvkm_fifo_cgrp *cgrp,
 	nvkm_wo32(memory, offset + 0xc, 0x00000000);
 }
 
-const struct gk104_fifo_runlist_func
+static const struct gk104_fifo_runlist_func
 gv100_fifo_runlist = {
 	.size = 16,
 	.cgrp = gv100_fifo_runlist_cgrp,
Signature · 1 line
2.23.0
author
#3 lore raw

PATCH 4/5 drm/nouveau/disp/gv100: make undeclared symbols static

In reply to Ben Dooks

The two objects gv100_disp_wndw and gv100_disp_wndw_mthd are not declared or used outside the file, so make them static to avoid the following warnings:

drivers/gpu/drm/nouveau/nvkm/engine/disp/wndwgv100.c:120:1: warning: symbol 'gv100_disp_wndw_mthd' was not declared. Should it be static? drivers/gpu/drm/nouveau/nvkm/engine/disp/wndwgv100.c:140:1: warning: symbol 'gv100_disp_wndw' was not declared. Should it be static?

---
 drivers/gpu/drm/nouveau/nvkm/engine/disp/wndwgv100.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/nouveau/nvkm/engine/disp/wndwgv100.c +2 -2
index 5d3b641dbb14..e635247d794f 100644
@@ -116,7 +116,7 @@ gv100_disp_wndw_mthd_base = {
 	}
 };
 
-const struct nv50_disp_chan_mthd
+static const struct nv50_disp_chan_mthd
 gv100_disp_wndw_mthd = {
 	.name = "Window",
 	.addr = 0x001000,
@@ -136,7 +136,7 @@ gv100_disp_wndw_intr(struct nv50_disp_chan *chan, bool en)
 	nvkm_mask(device, 0x611da4, mask, data);
 }
 
-const struct nv50_disp_chan_func
+static const struct nv50_disp_chan_func
 gv100_disp_wndw = {
 	.init = gv100_disp_dmac_init,
 	.fini = gv100_disp_dmac_fini,
Signature · 1 line
2.23.0
author
#4 lore raw

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

In reply to Ben Dooks

The gv100_disp_wimm is not declared, so make it static to avoid the following warning:

drivers/gpu/drm/nouveau/nvkm/engine/disp/wimmgv100.c:39:1: warning: symbol 'gv100_disp_wimm' was not declared. Should it be static?

---
 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.23.0