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

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
...@@ -92,7 +92,7 @@ calc(int blanks, int blanke, int total, int line) ...@@ -92,7 +92,7 @@ calc(int blanks, int blanke, int total, int line)
return line; return line;
} }
int static int
nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos, nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos,
ktime_t *stime, ktime_t *etime) ktime_t *stime, ktime_t *etime)
{ {
......
...@@ -66,7 +66,7 @@ nv10_fence_context_del(struct nouveau_channel *chan) ...@@ -66,7 +66,7 @@ nv10_fence_context_del(struct nouveau_channel *chan)
nouveau_fence_context_free(&fctx->base); nouveau_fence_context_free(&fctx->base);
} }
int static int
nv10_fence_context_new(struct nouveau_channel *chan) nv10_fence_context_new(struct nouveau_channel *chan)
{ {
struct nv10_fence_chan *fctx; struct nv10_fence_chan *fctx;
......
...@@ -326,7 +326,7 @@ nvkm_udevice = { ...@@ -326,7 +326,7 @@ nvkm_udevice = {
.sclass = nvkm_udevice_child_get, .sclass = nvkm_udevice_child_get,
}; };
int static int
nvkm_udevice_new(const struct nvkm_oclass *oclass, void *data, u32 size, nvkm_udevice_new(const struct nvkm_oclass *oclass, void *data, u32 size,
struct nvkm_object **pobject) struct nvkm_object **pobject)
{ {
......
...@@ -153,7 +153,7 @@ nv50_disp_chan_uevent = { ...@@ -153,7 +153,7 @@ nv50_disp_chan_uevent = {
.fini = nv50_disp_chan_uevent_fini, .fini = nv50_disp_chan_uevent_fini,
}; };
int static int
nv50_disp_chan_rd32(struct nvkm_object *object, u64 addr, u32 *data) nv50_disp_chan_rd32(struct nvkm_object *object, u64 addr, u32 *data)
{ {
struct nv50_disp_chan *chan = nv50_disp_chan(object); 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) ...@@ -163,7 +163,7 @@ nv50_disp_chan_rd32(struct nvkm_object *object, u64 addr, u32 *data)
return 0; return 0;
} }
int static int
nv50_disp_chan_wr32(struct nvkm_object *object, u64 addr, u32 data) nv50_disp_chan_wr32(struct nvkm_object *object, u64 addr, u32 data)
{ {
struct nv50_disp_chan *chan = nv50_disp_chan(object); 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) ...@@ -173,7 +173,7 @@ nv50_disp_chan_wr32(struct nvkm_object *object, u64 addr, u32 data)
return 0; return 0;
} }
int static int
nv50_disp_chan_ntfy(struct nvkm_object *object, u32 type, nv50_disp_chan_ntfy(struct nvkm_object *object, u32 type,
struct nvkm_event **pevent) struct nvkm_event **pevent)
{ {
...@@ -189,7 +189,7 @@ nv50_disp_chan_ntfy(struct nvkm_object *object, u32 type, ...@@ -189,7 +189,7 @@ nv50_disp_chan_ntfy(struct nvkm_object *object, u32 type,
return -EINVAL; return -EINVAL;
} }
int static int
nv50_disp_chan_map(struct nvkm_object *object, u64 *addr, u32 *size) nv50_disp_chan_map(struct nvkm_object *object, u64 *addr, u32 *size)
{ {
struct nv50_disp_chan *chan = nv50_disp_chan(object); struct nv50_disp_chan *chan = nv50_disp_chan(object);
......
...@@ -66,7 +66,7 @@ nv50_disp_root_scanoutpos(NV50_DISP_MTHD_V0) ...@@ -66,7 +66,7 @@ nv50_disp_root_scanoutpos(NV50_DISP_MTHD_V0)
return 0; return 0;
} }
int static int
nv50_disp_root_mthd_(struct nvkm_object *object, u32 mthd, void *data, u32 size) nv50_disp_root_mthd_(struct nvkm_object *object, u32 mthd, void *data, u32 size)
{ {
union { union {
......
...@@ -129,7 +129,7 @@ g84_fifo_chan_engine_fini(struct nvkm_fifo_chan *base, ...@@ -129,7 +129,7 @@ g84_fifo_chan_engine_fini(struct nvkm_fifo_chan *base,
} }
int static int
g84_fifo_chan_engine_init(struct nvkm_fifo_chan *base, g84_fifo_chan_engine_init(struct nvkm_fifo_chan *base,
struct nvkm_engine *engine) struct nvkm_engine *engine)
{ {
...@@ -170,7 +170,7 @@ g84_fifo_chan_engine_ctor(struct nvkm_fifo_chan *base, ...@@ -170,7 +170,7 @@ g84_fifo_chan_engine_ctor(struct nvkm_fifo_chan *base,
return nvkm_object_bind(object, NULL, 0, &chan->engn[engn]); return nvkm_object_bind(object, NULL, 0, &chan->engn[engn]);
} }
int static int
g84_fifo_chan_object_ctor(struct nvkm_fifo_chan *base, g84_fifo_chan_object_ctor(struct nvkm_fifo_chan *base,
struct nvkm_object *object) struct nvkm_object *object)
{ {
......
...@@ -218,7 +218,7 @@ gf117_grctx_generate_attrib(struct gf100_grctx *info) ...@@ -218,7 +218,7 @@ gf117_grctx_generate_attrib(struct gf100_grctx *info)
} }
} }
void static void
gf117_grctx_generate_main(struct gf100_gr *gr, struct gf100_grctx *info) gf117_grctx_generate_main(struct gf100_gr *gr, struct gf100_grctx *info)
{ {
struct nvkm_device *device = gr->base.engine.subdev.device; struct nvkm_device *device = gr->base.engine.subdev.device;
......
...@@ -933,7 +933,7 @@ gm107_grctx_generate_attrib(struct gf100_grctx *info) ...@@ -933,7 +933,7 @@ gm107_grctx_generate_attrib(struct gf100_grctx *info)
} }
} }
void static void
gm107_grctx_generate_tpcid(struct gf100_gr *gr) gm107_grctx_generate_tpcid(struct gf100_gr *gr)
{ {
struct nvkm_device *device = gr->base.engine.subdev.device; struct nvkm_device *device = gr->base.engine.subdev.device;
......
...@@ -1384,7 +1384,7 @@ gf100_gr_intr(struct nvkm_gr *base) ...@@ -1384,7 +1384,7 @@ gf100_gr_intr(struct nvkm_gr *base)
nvkm_fifo_chan_put(device->fifo, flags, &chan); nvkm_fifo_chan_put(device->fifo, flags, &chan);
} }
void static void
gf100_gr_init_fw(struct gf100_gr *gr, u32 fuc_base, gf100_gr_init_fw(struct gf100_gr *gr, u32 fuc_base,
struct gf100_gr_fuc *code, struct gf100_gr_fuc *data) struct gf100_gr_fuc *code, struct gf100_gr_fuc *data)
{ {
...@@ -1701,7 +1701,7 @@ gf100_gr_oneinit(struct nvkm_gr *base) ...@@ -1701,7 +1701,7 @@ gf100_gr_oneinit(struct nvkm_gr *base)
return 0; return 0;
} }
int static int
gf100_gr_init_(struct nvkm_gr *base) gf100_gr_init_(struct nvkm_gr *base)
{ {
struct gf100_gr *gr = gf100_gr(base); struct gf100_gr *gr = gf100_gr(base);
......
...@@ -308,7 +308,7 @@ gm107_gr_init_bios(struct gf100_gr *gr) ...@@ -308,7 +308,7 @@ gm107_gr_init_bios(struct gf100_gr *gr)
} }
} }
int static int
gm107_gr_init(struct gf100_gr *gr) gm107_gr_init(struct gf100_gr *gr)
{ {
struct nvkm_device *device = gr->base.engine.subdev.device; struct nvkm_device *device = gr->base.engine.subdev.device;
......
...@@ -71,7 +71,7 @@ nvkm_perfdom_find(struct nvkm_pm *pm, int di) ...@@ -71,7 +71,7 @@ nvkm_perfdom_find(struct nvkm_pm *pm, int di)
return NULL; return NULL;
} }
struct nvkm_perfsig * static struct nvkm_perfsig *
nvkm_perfsig_find(struct nvkm_pm *pm, u8 di, u8 si, struct nvkm_perfdom **pdom) nvkm_perfsig_find(struct nvkm_pm *pm, u8 di, u8 si, struct nvkm_perfdom **pdom)
{ {
struct nvkm_perfdom *dom = *pdom; struct nvkm_perfdom *dom = *pdom;
...@@ -699,7 +699,7 @@ nvkm_pm_oclass_get(struct nvkm_oclass *oclass, int index, ...@@ -699,7 +699,7 @@ nvkm_pm_oclass_get(struct nvkm_oclass *oclass, int index,
return 1; return 1;
} }
int static int
nvkm_perfsrc_new(struct nvkm_pm *pm, struct nvkm_perfsig *sig, nvkm_perfsrc_new(struct nvkm_pm *pm, struct nvkm_perfsig *sig,
const struct nvkm_specsrc *spec) const struct nvkm_specsrc *spec)
{ {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <subdev/bios/bit.h> #include <subdev/bios/bit.h>
#include <subdev/bios/fan.h> #include <subdev/bios/fan.h>
u16 static u16
nvbios_fan_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) nvbios_fan_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
{ {
struct bit_entry bit_P; struct bit_entry bit_P;
...@@ -52,7 +52,7 @@ nvbios_fan_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) ...@@ -52,7 +52,7 @@ nvbios_fan_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
return 0x0000; return 0x0000;
} }
u16 static u16
nvbios_fan_entry(struct nvkm_bios *bios, int idx, u8 *ver, u8 *hdr, nvbios_fan_entry(struct nvkm_bios *bios, int idx, u8 *ver, u8 *hdr,
u8 *cnt, u8 *len) u8 *cnt, u8 *len)
{ {
......
...@@ -180,7 +180,7 @@ gt215_clk_read(struct nvkm_clk *base, enum nv_clk_src src) ...@@ -180,7 +180,7 @@ gt215_clk_read(struct nvkm_clk *base, enum nv_clk_src src)
return 0; return 0;
} }
int static int
gt215_clk_info(struct nvkm_clk *base, int idx, u32 khz, gt215_clk_info(struct nvkm_clk *base, int idx, u32 khz,
struct gt215_clk_info *info) struct gt215_clk_info *info)
{ {
......
...@@ -95,7 +95,7 @@ struct gt215_ram { ...@@ -95,7 +95,7 @@ struct gt215_ram {
struct gt215_ltrain ltrain; struct gt215_ltrain ltrain;
}; };
void static void
gt215_link_train_calc(u32 *vals, struct gt215_ltrain *train) gt215_link_train_calc(u32 *vals, struct gt215_ltrain *train)
{ {
int i, lo, hi; int i, lo, hi;
...@@ -149,7 +149,7 @@ gt215_link_train_calc(u32 *vals, struct gt215_ltrain *train) ...@@ -149,7 +149,7 @@ gt215_link_train_calc(u32 *vals, struct gt215_ltrain *train)
/* /*
* Link training for (at least) DDR3 * Link training for (at least) DDR3
*/ */
int static int
gt215_link_train(struct gt215_ram *ram) gt215_link_train(struct gt215_ram *ram)
{ {
struct gt215_ltrain *train = &ram->ltrain; struct gt215_ltrain *train = &ram->ltrain;
...@@ -267,7 +267,7 @@ gt215_link_train(struct gt215_ram *ram) ...@@ -267,7 +267,7 @@ gt215_link_train(struct gt215_ram *ram)
return ret; return ret;
} }
int static int
gt215_link_train_init(struct gt215_ram *ram) gt215_link_train_init(struct gt215_ram *ram)
{ {
static const u32 pattern[16] = { static const u32 pattern[16] = {
...@@ -333,7 +333,7 @@ gt215_link_train_init(struct gt215_ram *ram) ...@@ -333,7 +333,7 @@ gt215_link_train_init(struct gt215_ram *ram)
return 0; return 0;
} }
void static void
gt215_link_train_fini(struct gt215_ram *ram) gt215_link_train_fini(struct gt215_ram *ram)
{ {
if (ram->ltrain.mem) if (ram->ltrain.mem)
......
...@@ -37,7 +37,7 @@ gk104_gpio_intr_stat(struct nvkm_gpio *gpio, u32 *hi, u32 *lo) ...@@ -37,7 +37,7 @@ gk104_gpio_intr_stat(struct nvkm_gpio *gpio, u32 *hi, u32 *lo)
nvkm_wr32(device, 0x00dc80, intr1); nvkm_wr32(device, 0x00dc80, intr1);
} }
void static void
gk104_gpio_intr_mask(struct nvkm_gpio *gpio, u32 type, u32 mask, u32 data) gk104_gpio_intr_mask(struct nvkm_gpio *gpio, u32 type, u32 mask, u32 data)
{ {
struct nvkm_device *device = gpio->subdev.device; struct nvkm_device *device = gpio->subdev.device;
......
...@@ -1364,7 +1364,7 @@ gm200_secboot_init(struct nvkm_secboot *sb) ...@@ -1364,7 +1364,7 @@ gm200_secboot_init(struct nvkm_secboot *sb)
return 0; return 0;
} }
int static int
gm200_secboot_fini(struct nvkm_secboot *sb, bool suspend) gm200_secboot_fini(struct nvkm_secboot *sb, bool suspend)
{ {
struct gm200_secboot *gsb = gm200_secboot(sb); struct gm200_secboot *gsb = gm200_secboot(sb);
......
...@@ -35,7 +35,7 @@ struct gk104_volt { ...@@ -35,7 +35,7 @@ struct gk104_volt {
struct nvbios_volt bios; struct nvbios_volt bios;
}; };
int static int
gk104_volt_get(struct nvkm_volt *base) gk104_volt_get(struct nvkm_volt *base)
{ {
struct nvbios_volt *bios = &gk104_volt(base)->bios; struct nvbios_volt *bios = &gk104_volt(base)->bios;
...@@ -48,7 +48,7 @@ gk104_volt_get(struct nvkm_volt *base) ...@@ -48,7 +48,7 @@ gk104_volt_get(struct nvkm_volt *base)
return bios->base + bios->pwm_range * duty / div; return bios->base + bios->pwm_range * duty / div;
} }
int static int
gk104_volt_set(struct nvkm_volt *base, u32 uv) gk104_volt_set(struct nvkm_volt *base, u32 uv)
{ {
struct nvbios_volt *bios = &gk104_volt(base)->bios; struct nvbios_volt *bios = &gk104_volt(base)->bios;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment