All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vhost: mark vhost_process_iotlb_msg() static
@ 2016-09-08  8:56 Baoyou Xie
  0 siblings, 0 replies; 2+ messages in thread
From: Baoyou Xie @ 2016-09-08  8:56 UTC (permalink / raw)
  To: mst
  Cc: kvm, virtualization, netdev, linux-kernel, arnd, baoyou.xie, xie.baoyou

We get 1 warning when building kernel with W=1:
drivers/vhost/vhost.c:937:5: warning: no previous prototype for 'vhost_process_iotlb_msg' [-Wmissing-prototypes]

In fact, this function is only used in the file in which it is
declared and don't need a declaration, but can be made static.
so this patch marks this function with 'static'.

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..bf045ac 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -934,8 +934,8 @@ static int umem_access_ok(u64 uaddr, u64 size, int access)
 	return 0;
 }
 
-int vhost_process_iotlb_msg(struct vhost_dev *dev,
-			    struct vhost_iotlb_msg *msg)
+static int vhost_process_iotlb_msg(struct vhost_dev *dev,
+				   struct vhost_iotlb_msg *msg)
 {
 	int ret = 0;
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] vhost: mark vhost_process_iotlb_msg() static
@ 2016-09-08  8:56 Baoyou Xie
  0 siblings, 0 replies; 2+ messages in thread
From: Baoyou Xie @ 2016-09-08  8:56 UTC (permalink / raw)
  To: mst
  Cc: kvm, arnd, netdev, xie.baoyou, linux-kernel, virtualization, baoyou.xie

We get 1 warning when building kernel with W=1:
drivers/vhost/vhost.c:937:5: warning: no previous prototype for 'vhost_process_iotlb_msg' [-Wmissing-prototypes]

In fact, this function is only used in the file in which it is
declared and don't need a declaration, but can be made static.
so this patch marks this function with 'static'.

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..bf045ac 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -934,8 +934,8 @@ static int umem_access_ok(u64 uaddr, u64 size, int access)
 	return 0;
 }
 
-int vhost_process_iotlb_msg(struct vhost_dev *dev,
-			    struct vhost_iotlb_msg *msg)
+static int vhost_process_iotlb_msg(struct vhost_dev *dev,
+				   struct vhost_iotlb_msg *msg)
 {
 	int ret = 0;
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-08  8:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-08  8:56 [PATCH] vhost: mark vhost_process_iotlb_msg() static Baoyou Xie
  -- strict thread matches above, loose matches on Subject: below --
2016-09-08  8:56 Baoyou Xie

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.