virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Baoyou Xie <baoyou.xie@linaro.org>
To: mst@redhat.com
Cc: kvm@vger.kernel.org, arnd@arndb.de, netdev@vger.kernel.org,
	tang.qiang007@zte.com.cn, xie.baoyou@zte.com.cn,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org, han.fei@zte.com.cn,
	baoyou.xie@linaro.org
Subject: [PATCH] vhost: mark symbols static in vhost.c
Date: Mon, 26 Sep 2016 19:45:03 +0800	[thread overview]
Message-ID: <1474890303-3456-1-git-send-email-baoyou.xie@linaro.org> (raw)

We get 4 warnings when building kernel with W=1:
drivers/vhost/vhost.c:52:23: warning: no previous prototype for 'vhost_umem_interval_tree_insert' [-Wmissing-prototypes]
drivers/vhost/vhost.c:52:23: warning: no previous prototype for 'vhost_umem_interval_tree_remove' [-Wmissing-prototypes]
drivers/vhost/vhost.c:52:23: warning: no previous prototype for 'vhost_umem_interval_tree_iter_first' [-Wmissing-prototypes]
drivers/vhost/vhost.c:52:23: warning: no previous prototype for 'vhost_umem_interval_tree_iter_next' [-Wmissing-prototypes]

In fact, these functions are defined in the
macro 'INTERVAL_TREE_DEFINE' in include/linux/interval_tree_generic.h
and don't need a declaration, but can be made static.

so this patch marks these functions with 'static' by modifying
the macro.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
 drivers/vhost/vhost.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index c6f2d89..99c6d0d 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -48,8 +48,8 @@ enum {
 #define vhost_avail_event(vq) ((__virtio16 __user *)&vq->used->ring[vq->num])
 
 INTERVAL_TREE_DEFINE(struct vhost_umem_node,
-		     rb, __u64, __subtree_last,
-		     START, LAST, , vhost_umem_interval_tree);
+		     rb, __u64, __subtree_last, START, LAST,
+		     static, vhost_umem_interval_tree);
 
 #ifdef CONFIG_VHOST_CROSS_ENDIAN_LEGACY
 static void vhost_disable_cross_endian(struct vhost_virtqueue *vq)
-- 
2.7.4

                 reply	other threads:[~2016-09-26 11:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1474890303-3456-1-git-send-email-baoyou.xie@linaro.org \
    --to=baoyou.xie@linaro.org \
    --cc=arnd@arndb.de \
    --cc=han.fei@zte.com.cn \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=tang.qiang007@zte.com.cn \
    --cc=virtualization@lists.linux-foundation.org \
    --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).