Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e08a1d97 authored by Baoyou Xie's avatar Baoyou Xie Committed by Ben Skeggs
Browse files

drm/nouveau: mark symbols static where possible



We get a few warnings when building kernel with W=1:
drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c:29:1: warning: no previous prototype for 'nvbios_fan_table' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c:56:1: warning: no previous prototype for 'nvbios_fan_entry' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/subdev/clk/gt215.c:184:1: warning: no previous prototype for 'gt215_clk_info' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c:99:1: warning: no previous prototype for 'gt215_link_train_calc' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c:153:1: warning: no previous prototype for 'gt215_link_train' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgt215.c:271:1: warning: no previous prototype for 'gt215_link_train_init' [-Wmissing-prototypes]
....

In fact, both functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks these functions with 'static'.

Signed-off-by: default avatarBaoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent e8390eb2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ calc(int blanks, int blanke, int total, int line)
	return line;
}

int
static int
nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos,
				ktime_t *stime, ktime_t *etime)
{
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ nv10_fence_context_del(struct nouveau_channel *chan)
	nouveau_fence_context_free(&fctx->base);
}

int
static int
nv10_fence_context_new(struct nouveau_channel *chan)
{
	struct nv10_fence_chan *fctx;
+1 −1
Original line number Diff line number Diff line
@@ -326,7 +326,7 @@ nvkm_udevice = {
	.sclass = nvkm_udevice_child_get,
};

int
static int
nvkm_udevice_new(const struct nvkm_oclass *oclass, void *data, u32 size,
		 struct nvkm_object **pobject)
{
+4 −4
Original line number Diff line number Diff line
@@ -153,7 +153,7 @@ nv50_disp_chan_uevent = {
	.fini = nv50_disp_chan_uevent_fini,
};

int
static int
nv50_disp_chan_rd32(struct nvkm_object *object, u64 addr, u32 *data)
{
	struct nv50_disp_chan *chan = nv50_disp_chan(object);
@@ -163,7 +163,7 @@ nv50_disp_chan_rd32(struct nvkm_object *object, u64 addr, u32 *data)
	return 0;
}

int
static int
nv50_disp_chan_wr32(struct nvkm_object *object, u64 addr, u32 data)
{
	struct nv50_disp_chan *chan = nv50_disp_chan(object);
@@ -173,7 +173,7 @@ nv50_disp_chan_wr32(struct nvkm_object *object, u64 addr, u32 data)
	return 0;
}

int
static int
nv50_disp_chan_ntfy(struct nvkm_object *object, u32 type,
		    struct nvkm_event **pevent)
{
@@ -189,7 +189,7 @@ nv50_disp_chan_ntfy(struct nvkm_object *object, u32 type,
	return -EINVAL;
}

int
static int
nv50_disp_chan_map(struct nvkm_object *object, u64 *addr, u32 *size)
{
	struct nv50_disp_chan *chan = nv50_disp_chan(object);
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ nv50_disp_root_scanoutpos(NV50_DISP_MTHD_V0)
	return 0;
}

int
static int
nv50_disp_root_mthd_(struct nvkm_object *object, u32 mthd, void *data, u32 size)
{
	union {
Loading