From patchwork Thu Sep 1 11:02:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 75190 Delivered-To: patch@linaro.org Received: by 10.140.29.8 with SMTP id a8csp230124qga; Thu, 1 Sep 2016 04:04:21 -0700 (PDT) X-Received: by 10.66.43.113 with SMTP id v17mr913580pal.112.1472727861433; Thu, 01 Sep 2016 04:04:21 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w64si5214657pfb.139.2016.09.01.04.04.18; Thu, 01 Sep 2016 04:04:21 -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 S932483AbcIALEQ (ORCPT + 27 others); Thu, 1 Sep 2016 07:04:16 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:35379 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932240AbcIALEN (ORCPT ); Thu, 1 Sep 2016 07:04:13 -0400 Received: by mail-pf0-f177.google.com with SMTP id x72so30402057pfd.2 for ; Thu, 01 Sep 2016 04:04:13 -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=6203IMXrn+DDr1fQbp8uZ8LHn7TMTGUm/Cr5dXrZ8c4=; b=HkWWuEI67wFhvppMmzVRN/iTKwld/trhOd/eUmi/wEtt4ur9aKUWaqmGcH3EXtQw8L 7bb9lP1o3eRvhTk1CothQwu3BUS6Njyb1SOX5iHgPVJcsRPw8+yBwM+L+zXlxk376BkD I94EGDdMk/egNuJwpnmwORYtWzLB2glud+Ujs= 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=6203IMXrn+DDr1fQbp8uZ8LHn7TMTGUm/Cr5dXrZ8c4=; b=frqgxw6oeH1LV45uhzDXgS+danhI4tizpvZbFtMyHHqq6q5sVL4YW+8zovdOGG8ag+ aWSF8Mfc3TlZu53DfoC3KC9pJl6QK6OKd8yXXGupV0OjaUJn8PxUyHkRqAqPSqUmUx8e ymcHGwgPT3xmMRHVrWU8mBwocWomNkTOuytvckqT1bcJSSZHVd9CHW42Kud+kjyhnbO4 KDVVPcYn5VU13k4EieNrHWrMyQVlCbZtT2rTWchyI7kG/h66+H84Zob2EeUJuLptejRJ 37TbU8TMmFNOydV2ttpQxBlU5xBc8BAlDOnkjbVSktGNPlMLV5H3+dPaU8IXcqrSjNiD MFIQ== X-Gm-Message-State: AE9vXwNTjlLnWN8Yr5h3QK+YwNN2+qsJAqKA2KHAPqNQSAaoiMY0NVfHM8WDt1pLNyZpV36D X-Received: by 10.98.194.82 with SMTP id l79mr912184pfg.113.1472727852484; Thu, 01 Sep 2016 04:04:12 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.82]) by smtp.gmail.com with ESMTPSA id x9sm5057475pfd.70.2016.09.01.04.04.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Sep 2016 04:04:11 -0700 (PDT) From: Baoyou Xie To: mst@redhat.com Cc: virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, arnd@arndb.de, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH] virtio: mark vring_dma_dev() static Date: Thu, 1 Sep 2016 19:02:57 +0800 Message-Id: <1472727777-4695-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 1 warning when building kernel with W=1: drivers/virtio/virtio_ring.c:170:16: warning: no previous prototype for 'vring_dma_dev' [-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 --- drivers/virtio/virtio_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 Acked-by: Arnd Bergmann diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 114a0c8..13b58db 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -167,7 +167,7 @@ static bool vring_use_dma_api(struct virtio_device *vdev) * making all of the arch DMA ops work on the vring device itself * is a mess. For now, we use the parent device for DMA ops. */ -struct device *vring_dma_dev(const struct vring_virtqueue *vq) +static struct device *vring_dma_dev(const struct vring_virtqueue *vq) { return vq->vq.vdev->dev.parent; }