From 24c8d965b03bb73fd1b463db5661436063bb9530 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Wed, 29 Nov 2017 16:18:56 -0700 Subject: [PATCH] rte_virtio: make vhost_msg_strings static The array of message strings is now only used in vhost_user.c, so it doesn't need to be exported. Change-Id: I40163b95a52a1762eb3639db5553814bf1299959 Signed-off-by: Daniel Verkamp Reviewed-on: https://review.gerrithub.io/389652 Tested-by: SPDK Automated Test System Reviewed-by: Changpeng Liu Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- lib/bdev/virtio/rte_virtio/virtio_user/vhost.h | 2 -- lib/bdev/virtio/rte_virtio/virtio_user/vhost_user.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/bdev/virtio/rte_virtio/virtio_user/vhost.h b/lib/bdev/virtio/rte_virtio/virtio_user/vhost.h index dc64fdb54..93e3c8928 100644 --- a/lib/bdev/virtio/rte_virtio/virtio_user/vhost.h +++ b/lib/bdev/virtio/rte_virtio/virtio_user/vhost.h @@ -67,8 +67,6 @@ enum vhost_user_request { VHOST_USER_MAX }; -extern const char *const vhost_msg_strings[VHOST_USER_MAX]; - struct virtio_user_backend_ops; struct virtio_user_dev { diff --git a/lib/bdev/virtio/rte_virtio/virtio_user/vhost_user.c b/lib/bdev/virtio/rte_virtio/virtio_user/vhost_user.c index fc915952a..a67d92ee6 100644 --- a/lib/bdev/virtio/rte_virtio/virtio_user/vhost_user.c +++ b/lib/bdev/virtio/rte_virtio/virtio_user/vhost_user.c @@ -261,7 +261,7 @@ prepare_vhost_memory_user(struct vhost_user_msg *msg, int fds[]) return 0; } -const char *const vhost_msg_strings[] = { +static const char *const vhost_msg_strings[VHOST_USER_MAX] = { [VHOST_USER_SET_OWNER] = "VHOST_SET_OWNER", [VHOST_USER_RESET_OWNER] = "VHOST_RESET_OWNER", [VHOST_USER_SET_FEATURES] = "VHOST_SET_FEATURES",