[PATCH 1/3] hw/dma/sparc32_dma: Make espdma_memory_[read/write] static

Philippe Mathieu-Daudé posted 3 patches 5 years, 11 months ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Jason Wang <jasowang@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Fam Zheng <fam@euphon.net>
[PATCH 1/3] hw/dma/sparc32_dma: Make espdma_memory_[read/write] static
Posted by Philippe Mathieu-Daudé 5 years, 11 months ago
No code use the espdma_memory_[read/write] functions outside
of hw/dma/sparc32_dma.c, make them static.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 include/hw/sparc/sparc32_dma.h | 2 --
 hw/dma/sparc32_dma.c           | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/hw/sparc/sparc32_dma.h b/include/hw/sparc/sparc32_dma.h
index ab42c5421b..b3811b617d 100644
--- a/include/hw/sparc/sparc32_dma.h
+++ b/include/hw/sparc/sparc32_dma.h
@@ -61,7 +61,5 @@ void ledma_memory_read(void *opaque, hwaddr addr,
                        uint8_t *buf, int len, int do_bswap);
 void ledma_memory_write(void *opaque, hwaddr addr,
                         uint8_t *buf, int len, int do_bswap);
-void espdma_memory_read(void *opaque, uint8_t *buf, int len);
-void espdma_memory_write(void *opaque, uint8_t *buf, int len);
 
 #endif
diff --git a/hw/dma/sparc32_dma.c b/hw/dma/sparc32_dma.c
index 3e4da0c47f..c9e313938c 100644
--- a/hw/dma/sparc32_dma.c
+++ b/hw/dma/sparc32_dma.c
@@ -142,7 +142,7 @@ static void dma_set_irq(void *opaque, int irq, int level)
     }
 }
 
-void espdma_memory_read(void *opaque, uint8_t *buf, int len)
+static void espdma_memory_read(void *opaque, uint8_t *buf, int len)
 {
     DMADeviceState *s = opaque;
     IOMMUState *is = (IOMMUState *)s->iommu;
@@ -152,7 +152,7 @@ void espdma_memory_read(void *opaque, uint8_t *buf, int len)
     s->dmaregs[1] += len;
 }
 
-void espdma_memory_write(void *opaque, uint8_t *buf, int len)
+static void espdma_memory_write(void *opaque, uint8_t *buf, int len)
 {
     DMADeviceState *s = opaque;
     IOMMUState *is = (IOMMUState *)s->iommu;
-- 
2.21.1


Re: [PATCH 1/3] hw/dma/sparc32_dma: Make espdma_memory_[read/write] static
Posted by Peter Maydell 5 years, 11 months ago
On Fri, 21 Feb 2020 at 13:25, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> No code use the espdma_memory_[read/write] functions outside
> of hw/dma/sparc32_dma.c, make them static.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM