From patchwork Mon Sep 26 11:45:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 675115 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3sjMbm61ylz9s9c for ; Mon, 26 Sep 2016 21:45:40 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b=BZLSQ3JI; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030427AbcIZLpX (ORCPT ); Mon, 26 Sep 2016 07:45:23 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:34940 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030293AbcIZLpV (ORCPT ); Mon, 26 Sep 2016 07:45:21 -0400 Received: by mail-pf0-f177.google.com with SMTP id s13so30766306pfd.2 for ; Mon, 26 Sep 2016 04:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=UF9fAFSY6pGDF2KU3mTzc3SAjou3hOF/FmpTNehit/I=; b=BZLSQ3JIgX+USHAoUTurfXsUMh3GHqt5UI+dfogf07vIutERUfp/H79yCpCByobmL3 Hg54vLjdp2y6Tk/tbXnHISMbzb1TmN+7eniGCL9K6OudDogAn/aLoEp8KYpTP4gV2SsW GhOc2lX1GfbI3PV4yownhPrPEjd1Ivdz6bSpQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UF9fAFSY6pGDF2KU3mTzc3SAjou3hOF/FmpTNehit/I=; b=O6+Ugzx5OJ1iOgE5OauU66riX8Ix0M4CKc8cK6zbFOF+aDutBtAEs3c1jIvVHC+lxH pvXoY6Z/LdTyy7o0fGzQ3qgRsiti+xgIZjaYyBvIFXLMbQBLs3OOqAXrA8D9uoxTo4wc uBH4f/tjuqCMIxt1p1/VnUkXdbDSNwHMmrM2prfI7fyz51selg9bwSwv8DkgTlIixDBg 0QVDSs2/fx9+jkRZaI+7Abchhs+Ln1fPlpwtsibDQTfrUQ0jY8n/fIPIM384xPbJw6EL hBZdTUWmMU9wvUqWmzhE5h1Nq/d9//WQREclkju7vkvW2BJy3IH2EQSxhDvJ0d4k/Lya Jq6g== X-Gm-Message-State: AE9vXwNFRM85Bkqn0YQPTPzmCIHK6Zu7/3MfbCRZEKRQBbpc0gEHwBW0k3vE7e4PN6tGNJtD X-Received: by 10.98.26.139 with SMTP id a133mr37807569pfa.167.1474890320655; Mon, 26 Sep 2016 04:45:20 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.34]) by smtp.gmail.com with ESMTPSA id tn5sm30718887pac.6.2016.09.26.04.45.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Sep 2016 04:45:20 -0700 (PDT) From: Baoyou Xie To: mst@redhat.com Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn, han.fei@zte.com.cn, tang.qiang007@zte.com.cn Subject: [PATCH] vhost: mark symbols static in vhost.c Date: Mon, 26 Sep 2016 19:45:03 +0800 Message-Id: <1474890303-3456-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- 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)