From patchwork Thu Sep 1 11:15:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 75191 Delivered-To: patch@linaro.org Received: by 10.140.29.8 with SMTP id a8csp236261qga; Thu, 1 Sep 2016 04:16:11 -0700 (PDT) X-Received: by 10.98.155.17 with SMTP id r17mr25843339pfd.24.1472728571347; Thu, 01 Sep 2016 04:16:11 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id lu15si5178816pab.140.2016.09.01.04.16.11; Thu, 01 Sep 2016 04:16:11 -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 S1754985AbcIALQI (ORCPT + 27 others); Thu, 1 Sep 2016 07:16:08 -0400 Received: from mail-pf0-f170.google.com ([209.85.192.170]:33652 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754432AbcIALQG (ORCPT ); Thu, 1 Sep 2016 07:16:06 -0400 Received: by mail-pf0-f170.google.com with SMTP id g202so7387912pfb.0 for ; Thu, 01 Sep 2016 04:16:06 -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=hB7HOT8Z8u37H4WhZnjtvAh5bHF5PSTmeVB3+ZzzdJI=; b=eF/OCWUPpSu9xiw6IPrvxXxFfDDQBEIxOk2/omc66J0U/kpusDkfzwL01RLg4TTe5Q uLuuT44+RmbOMvnxKJLOzwsu5mxOFQadgFOpO22v2/J48W+fBpfFSHw2f5nqqJzzUOVh rk653SoVMAN5TXCvn9CTAzQGW2VbbT99VX7Go= 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=hB7HOT8Z8u37H4WhZnjtvAh5bHF5PSTmeVB3+ZzzdJI=; b=HH9B+5uD2CbDpn1hjd4sDA8KGw/rZNo3XJQJHCiMdUl9bzoZ8hlHfdF5/5amo9gU9u qZKG8wj4257PfQXOUpRayNdD9FkYqpUspKgWljwq7vl+KiS81UVytjIsnMnFyLO6tJeu h+wItsiFPGEMJhgU96gsLLCp7A9kjXKvs+2Aj01/9655Gw2qcJtEtPO83jWLUw4sc0Kn EV/t0RdRTlnINKx2OdpwJx8Fcheyx/x38AVZ0sFPXwuPZTMjgx4ZI58OW+Lz0CqOjhS7 XcWELV2o2hFhPyxJgggN8UA/ouXS0cocOtl+Eb90HCO2J8JK76XbNyCpuZIcTy39iqpr r7mg== X-Gm-Message-State: AE9vXwPDwXvxCnQiGwkAQTgctyvsevv1cvK2zl3s7ss5qbq77yq6ocKkzt2d+VlkeYS8/zW8 X-Received: by 10.98.73.24 with SMTP id w24mr25798596pfa.27.1472728565989; Thu, 01 Sep 2016 04:16:05 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.82]) by smtp.gmail.com with ESMTPSA id m24sm6854733pfi.34.2016.09.01.04.15.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Sep 2016 04:16:04 -0700 (PDT) From: Baoyou Xie To: b.reynal@virtualopensystems.com, alex.williamson@redhat.com, eric.auger@linaro.org, arnd@arndb.de, dan.carpenter@oracle.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, baoyou.xie@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH] vfio: platform: mark symbols static where possible Date: Thu, 1 Sep 2016 19:15:35 +0800 Message-Id: <1472728535-8584-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 a few warnings when building kernel with W=1: drivers/vfio/platform/vfio_platform_common.c:76:5: warning: no previous prototype for 'vfio_platform_acpi_call_reset' [-Wmissing-prototypes] drivers/vfio/platform/vfio_platform_common.c:98:6: warning: no previous prototype for 'vfio_platform_acpi_has_reset' [-Wmissing-prototypes] drivers/vfio/platform/vfio_platform_common.c:640:5: warning: no previous prototype for 'vfio_platform_of_probe' [-Wmissing-prototypes] drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:59:5: warning: no previous prototype for 'vfio_platform_amdxgbe_reset' [-Wmissing-prototypes] drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c:60:5: warning: no previous prototype for 'vfio_platform_calxedaxgmac_reset' [-Wmissing-prototypes] .... In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie --- drivers/vfio/platform/reset/vfio_platform_amdxgbe.c | 2 +- drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c | 2 +- drivers/vfio/platform/vfio_platform_common.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) -- 2.7.4 Acked-by: Arnd Bergmann Reviewed-by: Eric Auger Reviewed-by: Baptiste Reynal diff --git a/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c b/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c index d4030d0..bcd419c 100644 --- a/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c +++ b/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c @@ -56,7 +56,7 @@ static void xmdio_write(void *ioaddr, unsigned int mmd, iowrite32(value, ioaddr + ((mmd_address & 0xff) << 2)); } -int vfio_platform_amdxgbe_reset(struct vfio_platform_device *vdev) +static int vfio_platform_amdxgbe_reset(struct vfio_platform_device *vdev) { struct vfio_platform_region *xgmac_regs = &vdev->regions[0]; struct vfio_platform_region *xpcs_regs = &vdev->regions[1]; diff --git a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c b/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c index e3d3d94..49e5df6 100644 --- a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c +++ b/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c @@ -57,7 +57,7 @@ static inline void xgmac_mac_disable(void __iomem *ioaddr) writel(value, ioaddr + XGMAC_CONTROL); } -int vfio_platform_calxedaxgmac_reset(struct vfio_platform_device *vdev) +static int vfio_platform_calxedaxgmac_reset(struct vfio_platform_device *vdev) { struct vfio_platform_region *reg = &vdev->regions[0]; diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c index 1cf2d46..d781428 100644 --- a/drivers/vfio/platform/vfio_platform_common.c +++ b/drivers/vfio/platform/vfio_platform_common.c @@ -73,7 +73,7 @@ static int vfio_platform_acpi_probe(struct vfio_platform_device *vdev, return WARN_ON(!vdev->acpihid) ? -EINVAL : 0; } -int vfio_platform_acpi_call_reset(struct vfio_platform_device *vdev, +static int vfio_platform_acpi_call_reset(struct vfio_platform_device *vdev, const char **extra_dbg) { #ifdef CONFIG_ACPI @@ -95,7 +95,7 @@ int vfio_platform_acpi_call_reset(struct vfio_platform_device *vdev, #endif } -bool vfio_platform_acpi_has_reset(struct vfio_platform_device *vdev) +static bool vfio_platform_acpi_has_reset(struct vfio_platform_device *vdev) { #ifdef CONFIG_ACPI struct device *dev = vdev->device; @@ -637,7 +637,7 @@ static const struct vfio_device_ops vfio_platform_ops = { .mmap = vfio_platform_mmap, }; -int vfio_platform_of_probe(struct vfio_platform_device *vdev, +static int vfio_platform_of_probe(struct vfio_platform_device *vdev, struct device *dev) { int ret;