2019-04-16 14:51:11

by Yue Haibing

[permalink] [raw]
Subject: [PATCH -next] xen-swiotlb: Make two functions static

From: YueHaibing <[email protected]>

Fix sparse warnings:

drivers/xen/swiotlb-xen.c:489:1: warning:
symbol 'xen_swiotlb_sync_single_for_cpu' was not declared. Should it be static?
drivers/xen/swiotlb-xen.c:496:1: warning:
symbol 'xen_swiotlb_sync_single_for_device' was not declared. Should it be static?

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: YueHaibing <[email protected]>
---
drivers/xen/swiotlb-xen.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index 877baf2..e741df4 100644
--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -485,14 +485,14 @@ xen_swiotlb_sync_single(struct device *hwdev, dma_addr_t dev_addr,
xen_dma_sync_single_for_device(hwdev, dev_addr, size, dir);
}

-void
+static void
xen_swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr,
size_t size, enum dma_data_direction dir)
{
xen_swiotlb_sync_single(hwdev, dev_addr, size, dir, SYNC_FOR_CPU);
}

-void
+static void
xen_swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr,
size_t size, enum dma_data_direction dir)
{
--
2.7.4



2019-04-16 15:46:27

by Boris Ostrovsky

[permalink] [raw]
Subject: Re: [PATCH -next] xen-swiotlb: Make two functions static

On 4/16/19 10:49 AM, Yue Haibing wrote:
> From: YueHaibing <[email protected]>
>
> Fix sparse warnings:
>
> drivers/xen/swiotlb-xen.c:489:1: warning:
> symbol 'xen_swiotlb_sync_single_for_cpu' was not declared. Should it be static?
> drivers/xen/swiotlb-xen.c:496:1: warning:
> symbol 'xen_swiotlb_sync_single_for_device' was not declared. Should it be static?
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: YueHaibing <[email protected]>


I think latest patches from Christoph take care of this.

-boris


> ---
> drivers/xen/swiotlb-xen.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
> index 877baf2..e741df4 100644
> --- a/drivers/xen/swiotlb-xen.c
> +++ b/drivers/xen/swiotlb-xen.c
> @@ -485,14 +485,14 @@ xen_swiotlb_sync_single(struct device *hwdev, dma_addr_t dev_addr,
> xen_dma_sync_single_for_device(hwdev, dev_addr, size, dir);
> }
>
> -void
> +static void
> xen_swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr,
> size_t size, enum dma_data_direction dir)
> {
> xen_swiotlb_sync_single(hwdev, dev_addr, size, dir, SYNC_FOR_CPU);
> }
>
> -void
> +static void
> xen_swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr,
> size_t size, enum dma_data_direction dir)
> {