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: 77019 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp1129515qgf; Mon, 26 Sep 2016 04:45:27 -0700 (PDT) X-Received: by 10.98.72.157 with SMTP id q29mr38707519pfi.44.1474890327440; Mon, 26 Sep 2016 04:45:27 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 82si24640850pfs.145.2016.09.26.04.45.27; Mon, 26 Sep 2016 04:45:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032305AbcIZLpX (ORCPT + 27 others); Mon, 26 Sep 2016 07:45:23 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:34228 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030220AbcIZLpV (ORCPT ); Mon, 26 Sep 2016 07:45:21 -0400 Received: by mail-pf0-f178.google.com with SMTP id l25so17013173pfb.1 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=erQ+GklNQYGLFmD3X2uy951Utu1EwGaJ9zv/uYH/S6/ijqQgNDn3lBm1hKkbKdgG9o vhbuVVumWWWltbaLUM62qvMqipFS2zgEKgbCYkOZk+C6m57CIa9/I53pkPEGMzhqxxGt kar2CsIedi4cGzI2lVnZMlTTJrMJ9GGFrTFS1OaaLn8xKADrTJQq5LsM0CTTO1vo8qVy L0kr3ftmjF4PlN7vKytPVSg/Q89U0kEx2XSS4h3qnrwr0vh956YCu6rV9VLd5wVdCZEo K7W1IK6q8bBL6u1egjZCTCVn+cKbLAoDgh9A/8glZgzRKDIU7LmuDaPM90cRTTbIydNO EbSA== X-Gm-Message-State: AE9vXwMXVXFyO8yDKFIuzPcAu1cIXLHVTMC1vd2VigTLAHWoJtF0y1EFDIgNUm8HQDbKN5+x 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) -- 2.7.4 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)