Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1478189
| From | Baoyou Xie <baoyou.xie@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] drm/sti: mark symbols static where possible |
| Date | 2016-09-07 13:10 +0200 |
| Message-ID | <seITU-7oj-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
We get 2 warnings when building kernel with W=1:
drivers/gpu/drm/sti/sti_mixer.c:361:6: warning: no previous prototype for 'sti_mixer_set_matrix' [-Wmissing-prototypes]
drivers/gpu/drm/sti/sti_dvo.c:109:5: warning: no previous prototype for 'dvo_awg_generate_code' [-Wmissing-prototypes]
In fact, these 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/sti/sti_dvo.c | 3 ++-
drivers/gpu/drm/sti/sti_mixer.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
index 00881eb..4545ad0 100644
--- a/drivers/gpu/drm/sti/sti_dvo.c
+++ b/drivers/gpu/drm/sti/sti_dvo.c
@@ -106,7 +106,8 @@ struct sti_dvo_connector {
container_of(x, struct sti_dvo_connector, drm_connector)
#define BLANKING_LEVEL 16
-int dvo_awg_generate_code(struct sti_dvo *dvo, u8 *ram_size, u32 *ram_code)
+static int
+dvo_awg_generate_code(struct sti_dvo *dvo, u8 *ram_size, u32 *ram_code)
{
struct drm_display_mode *mode = &dvo->mode;
struct dvo_config *config = dvo->config;
diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c
index 7d9aea8..b78cec5 100644
--- a/drivers/gpu/drm/sti/sti_mixer.c
+++ b/drivers/gpu/drm/sti/sti_mixer.c
@@ -358,7 +358,7 @@ int sti_mixer_set_plane_status(struct sti_mixer *mixer,
return 0;
}
-void sti_mixer_set_matrix(struct sti_mixer *mixer)
+static void sti_mixer_set_matrix(struct sti_mixer *mixer)
{
unsigned int i;
--
2.7.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] drm/sti: mark symbols static where possible Baoyou Xie <baoyou.xie@linaro.org> - 2016-09-07 13:10 +0200
Re: [PATCH] drm/sti: mark symbols static where possible Emil Velikov <emil.l.velikov@gmail.com> - 2016-09-08 11:40 +0200
Re: [PATCH] drm/sti: mark symbols static where possible Arnd Bergmann <arnd@arndb.de> - 2016-09-08 12:10 +0200
Re: [PATCH] drm/sti: mark symbols static where possible Emil Velikov <emil.l.velikov@gmail.com> - 2016-09-09 14:50 +0200
Re: [PATCH] drm/sti: mark symbols static where possible Benjamin Gaignard <benjamin.gaignard@linaro.org> - 2016-09-08 12:10 +0200
csiph-web