diff options
author | Baoyou Xie <baoyou.xie@linaro.org> | 2016-09-01 14:15:35 +0300 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2016-09-14 01:11:37 +0300 |
commit | 2e06285655b59362847b610a7cfad204fee9640b (patch) | |
tree | 5ca738d21f4710ed438129ef6da1761356373e6d /drivers/vfio/platform/reset | |
parent | 8138dabbab269d9d6ba2ffa17aad03aff22cfdb6 (diff) | |
download | linux-2e06285655b59362847b610a7cfad204fee9640b.tar.xz |
vfio: platform: mark symbols static where possible
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 <baoyou.xie@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Baptiste Reynal <b.reynal@virtualopensystems.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/platform/reset')
-rw-r--r-- | drivers/vfio/platform/reset/vfio_platform_amdxgbe.c | 2 | ||||
-rw-r--r-- | drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c b/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c index d4030d0c38e9..bcd419cfd79c 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 e3d3d948e661..49e5df6e8f29 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]; |