From: Baoyou Xie <baoyou.xie@linaro.org>
To: bskeggs@redhat.com, airlied@linux.ie, acourbot@nvidia.com,
imirkin@alum.mit.edu, Julia.Lawall@lip6.fr, martin.peres@free.fr,
rspliet@eclipso.eu, nouveau@karolherbst.de
Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
linux-kernel@vger.kernel.org, arnd@arndb.de,
baoyou.xie@linaro.org, xie.baoyou@zte.com.cn, han.fei@zte.com.cn,
tang.qiang007@zte.com.cn
Subject: [PATCH 14/17] drm/nouveau/gr: mark symbols static where possible
Date: Sat, 22 Oct 2016 17:41:55 +0800 [thread overview]
Message-ID: <1477129318-29677-14-git-send-email-baoyou.xie@linaro.org> (raw)
In-Reply-To: <1477129318-29677-1-git-send-email-baoyou.xie@linaro.org>
We get 5 warnings when building kernel with W=1:
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:1388:1: warning: no previous prototype for 'gf100_gr_init_fw' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:1705:1: warning: no previous prototype for 'gf100_gr_init_' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c:312:1: warning: no previous prototype for 'gm107_gr_init' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c:222:1: warning: no previous prototype for 'gf117_grctx_generate_main' [-Wmissing-prototypes]
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c:937:1: warning: no previous prototype for 'gm107_grctx_generate_tpcid' [-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: Baoyou Xie <baoyou.xie@linaro.org>
---
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c | 2 +-
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c | 2 +-
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 4 ++--
drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c
index c925ade..74a64e3 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c
@@ -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)
{
struct nvkm_device *device = gr->base.engine.subdev.device;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c
index 6d3c501..4c4b5ab 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c
@@ -933,7 +933,7 @@ gm107_grctx_generate_attrib(struct gf100_grctx *info)
}
}
-void
+static void
gm107_grctx_generate_tpcid(struct gf100_gr *gr)
{
struct nvkm_device *device = gr->base.engine.subdev.device;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
index 157919c..eccdee0 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
@@ -1384,7 +1384,7 @@ gf100_gr_intr(struct nvkm_gr *base)
nvkm_fifo_chan_put(device->fifo, flags, &chan);
}
-void
+static void
gf100_gr_init_fw(struct gf100_gr *gr, u32 fuc_base,
struct gf100_gr_fuc *code, struct gf100_gr_fuc *data)
{
@@ -1701,7 +1701,7 @@ gf100_gr_oneinit(struct nvkm_gr *base)
return 0;
}
-int
+static int
gf100_gr_init_(struct nvkm_gr *base)
{
struct gf100_gr *gr = gf100_gr(base);
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c
index 45f965f..2c67fac 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c
@@ -308,7 +308,7 @@ gm107_gr_init_bios(struct gf100_gr *gr)
}
}
-int
+static int
gm107_gr_init(struct gf100_gr *gr)
{
struct nvkm_device *device = gr->base.engine.subdev.device;
--
2.7.4
next prev parent reply other threads:[~2016-10-22 9:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-22 9:41 [PATCH 01/17] drm/nouveau/core: add missing header dependencies Baoyou Xie
2016-10-22 9:41 ` [PATCH 02/17] drm/nouveau/bios: mark symbols static where possible Baoyou Xie
2016-10-22 9:41 ` [PATCH 03/17] drm/nouveau/clk: mark symbol " Baoyou Xie
2016-10-22 9:41 ` [PATCH 04/17] drm/nouveau/fb: add missing header dependencies Baoyou Xie
2016-10-22 9:41 ` [PATCH 05/17] drm/nouveau/fb: mark symbols static where possible Baoyou Xie
2016-10-22 9:41 ` [PATCH 06/17] drm/nouveau/gpio: mark symbol " Baoyou Xie
2016-10-22 9:41 ` [PATCH 07/17] drm/nouveau/secboot: " Baoyou Xie
2016-10-22 9:41 ` [PATCH 08/17] drm/nouveau/volt: add missing header dependencies Baoyou Xie
2016-10-22 9:41 ` [PATCH 09/17] drm/nouveau/volt: mark symbols static where possible Baoyou Xie
2016-10-22 9:41 ` [PATCH 10/17] drm/nouveau/device: mark symbol " Baoyou Xie
2016-10-22 9:41 ` [PATCH 11/17] drm/nouveau/disp: mark symbols " Baoyou Xie
2016-10-22 9:41 ` [PATCH 12/17] drm/nouveau/fifo: " Baoyou Xie
2016-10-22 9:41 ` [PATCH 13/17] drm/nouveau/gr: add missing header dependencies Baoyou Xie
2016-10-22 9:41 ` Baoyou Xie [this message]
2016-10-22 9:41 ` [PATCH 15/17] drm/nouveau/pm: mark symbols static where possible Baoyou Xie
2016-10-22 9:41 ` [PATCH 16/17] drm/nouveau/dispnv04: add missing header dependencies Baoyou Xie
2016-10-22 9:41 ` [PATCH 17/17] drm/nouveau: mark symbols static where possible Baoyou Xie
2016-10-22 17:32 ` [Nouveau] [PATCH 01/17] drm/nouveau/core: add missing header dependencies Karol Herbst
[not found] ` <CA+DQWkwyKzpU+oPxsz1LAPB34gQRuJGchHqzj-4262dnYdsFFw@mail.gmail.com>
2016-10-24 15:43 ` Karol Herbst
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1477129318-29677-14-git-send-email-baoyou.xie@linaro.org \
--to=baoyou.xie@linaro.org \
--cc=Julia.Lawall@lip6.fr \
--cc=acourbot@nvidia.com \
--cc=airlied@linux.ie \
--cc=arnd@arndb.de \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=han.fei@zte.com.cn \
--cc=imirkin@alum.mit.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.peres@free.fr \
--cc=nouveau@karolherbst.de \
--cc=nouveau@lists.freedesktop.org \
--cc=rspliet@eclipso.eu \
--cc=tang.qiang007@zte.com.cn \
--cc=xie.baoyou@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).