diff options
author | Baoyou Xie <baoyou.xie@linaro.org> | 2016-09-01 19:15:35 +0800 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2016-09-13 16:11:37 -0600 |
commit | 2e06285655b59362847b610a7cfad204fee9640b (patch) | |
tree | 5ca738d21f4710ed438129ef6da1761356373e6d /drivers/vfio/platform/vfio_platform_common.c | |
parent | 8138dabbab269d9d6ba2ffa17aad03aff22cfdb6 (diff) |
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/vfio_platform_common.c')
-rw-r--r-- | drivers/vfio/platform/vfio_platform_common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c index 1cf2d462b53d..d78142830754 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; |