All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baoyou Xie <baoyou.xie@linaro.org>
To: benjamin.gaignard@linaro.org, vincent.abriou@st.com, airlied@linux.ie
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn
Subject: [PATCH] drm/sti: mark symbols static where possible
Date: Thu, 15 Sep 2016 19:39:00 +0800	[thread overview]
Message-ID: <1473939540-2597-1-git-send-email-baoyou.xie@linaro.org> (raw)

We get 4 warnings when building kernel with W=1:
drivers/gpu/drm/sti/sti_gdp.c:476:5: warning: no previous prototype for 'sti_gdp_field_cb' [-Wmissing-prototypes]
drivers/gpu/drm/sti/sti_hqvdp.c:786:5: warning: no previous prototype for 'sti_hqvdp_vtg_cb' [-Wmissing-prototypes]
drivers/gpu/drm/sti/sti_hqvdp.c:1292:5: warning: no previous prototype for 'sti_hqvdp_bind' [-Wmissing-prototypes]
drivers/gpu/drm/sti/sti_drv.c:143:6: warning: no previous prototype for 'sti_drm_dbg_cleanup' [-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_drv.c   | 2 +-
 drivers/gpu/drm/sti/sti_gdp.c   | 2 +-
 drivers/gpu/drm/sti/sti_hqvdp.c | 5 +++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c
index 7cd3804..e6f0706 100644
--- a/drivers/gpu/drm/sti/sti_drv.c
+++ b/drivers/gpu/drm/sti/sti_drv.c
@@ -140,7 +140,7 @@ err:
 	return ret;
 }
 
-void sti_drm_dbg_cleanup(struct drm_minor *minor)
+static void sti_drm_dbg_cleanup(struct drm_minor *minor)
 {
 	drm_debugfs_remove_files(sti_drm_dbg_list,
 				 ARRAY_SIZE(sti_drm_dbg_list), minor);
diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c
index b8d942c..4648d1b 100644
--- a/drivers/gpu/drm/sti/sti_gdp.c
+++ b/drivers/gpu/drm/sti/sti_gdp.c
@@ -473,7 +473,7 @@ static void sti_gdp_disable(struct sti_gdp *gdp)
  * RETURNS:
  * 0 on success.
  */
-int sti_gdp_field_cb(struct notifier_block *nb,
+static int sti_gdp_field_cb(struct notifier_block *nb,
 		unsigned long event, void *data)
 {
 	struct sti_gdp *gdp = container_of(nb, struct sti_gdp, vtg_field_nb);
diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
index b5ee783..7f0dea8 100644
--- a/drivers/gpu/drm/sti/sti_hqvdp.c
+++ b/drivers/gpu/drm/sti/sti_hqvdp.c
@@ -783,7 +783,8 @@ static void sti_hqvdp_disable(struct sti_hqvdp *hqvdp)
  * RETURNS:
  * 0 on success.
  */
-int sti_hqvdp_vtg_cb(struct notifier_block *nb, unsigned long evt, void *data)
+static int
+sti_hqvdp_vtg_cb(struct notifier_block *nb, unsigned long evt, void *data)
 {
 	struct sti_hqvdp *hqvdp = container_of(nb, struct sti_hqvdp, vtg_nb);
 	int btm_cmd_offset, top_cmd_offest;
@@ -1289,7 +1290,7 @@ static struct drm_plane *sti_hqvdp_create(struct drm_device *drm_dev,
 	return &hqvdp->plane.drm_plane;
 }
 
-int sti_hqvdp_bind(struct device *dev, struct device *master, void *data)
+static int sti_hqvdp_bind(struct device *dev, struct device *master, void *data)
 {
 	struct sti_hqvdp *hqvdp = dev_get_drvdata(dev);
 	struct drm_device *drm_dev = data;
-- 
2.7.4

             reply	other threads:[~2016-09-15 11:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-15 11:39 Baoyou Xie [this message]
2016-09-15 15:15 ` [PATCH] drm/sti: mark symbols static where possible Vincent ABRIOU
2016-09-15 15:15   ` Vincent ABRIOU
  -- strict thread matches above, loose matches on Subject: below --
2016-09-25  7:57 Baoyou Xie
2016-09-27 16:35 ` Sean Paul
2016-09-27 16:35   ` Sean Paul
2016-09-27 19:07   ` Benjamin Gaignard
2016-09-27 19:07     ` Benjamin Gaignard
2016-09-28  7:27     ` Vincent ABRIOU
2016-09-28  7:27       ` Vincent ABRIOU
2016-09-29  9:27       ` Daniel Vetter
2016-09-29  9:27         ` Daniel Vetter
2016-09-07 11:05 Baoyou Xie
2016-09-08  9:35 ` Emil Velikov
2016-09-08  9:35   ` Emil Velikov
2016-09-08  9:56   ` Arnd Bergmann
2016-09-08  9:56     ` Arnd Bergmann
2016-09-09 12:46     ` Emil Velikov
2016-09-08 10:07 ` Benjamin Gaignard

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=1473939540-2597-1-git-send-email-baoyou.xie@linaro.org \
    --to=baoyou.xie@linaro.org \
    --cc=airlied@linux.ie \
    --cc=arnd@arndb.de \
    --cc=benjamin.gaignard@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vincent.abriou@st.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.