[PATCH v8 08/14] sh: Align prototypes of IO memcpy/memset
From: Julian Vetter
Date: Tue Oct 08 2024 - 04:26:07 EST
Align the prototypes of the memcpy_{from,to}io and memset_io functions
with the new ones from iomap_copy.c and remove function declarations,
because they are now declared in asm-generic/io.h.
Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
Reviewed-by: Yann Sionneau <ysionneau@xxxxxxxxxxxxx>
Signed-off-by: Julian Vetter <jvetter@xxxxxxxxxxxxx>
---
Changes for v8:
- No changes
---
arch/sh/include/asm/io.h | 3 ---
arch/sh/kernel/io.c | 6 +++---
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index cf5eab840d57..e5c780eb22d4 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -272,9 +272,6 @@ __BUILD_IOPORT_STRING(q, u64)
#define memset_io memset_io
#define memcpy_fromio memcpy_fromio
#define memcpy_toio memcpy_toio
-void memcpy_fromio(void *, const volatile void __iomem *, unsigned long);
-void memcpy_toio(volatile void __iomem *, const void *, unsigned long);
-void memset_io(volatile void __iomem *, int, unsigned long);
/* Quad-word real-mode I/O, don't ask.. */
unsigned long long peek_real_address_q(unsigned long long addr);
diff --git a/arch/sh/kernel/io.c b/arch/sh/kernel/io.c
index da22f3b32d30..588771cf9b7e 100644
--- a/arch/sh/kernel/io.c
+++ b/arch/sh/kernel/io.c
@@ -13,7 +13,7 @@
/*
* Copy data from IO memory space to "real" memory space.
*/
-void memcpy_fromio(void *to, const volatile void __iomem *from, unsigned long count)
+void memcpy_fromio(void *to, const volatile void __iomem *from, size_t count)
{
/*
* Would it be worthwhile doing byte and long transfers first
@@ -76,7 +76,7 @@ EXPORT_SYMBOL(memcpy_fromio);
/*
* Copy data from "real" memory space to IO memory space.
*/
-void memcpy_toio(volatile void __iomem *to, const void *from, unsigned long count)
+void memcpy_toio(volatile void __iomem *to, const void *from, size_t count)
{
if ((((u32)to | (u32)from) & 0x3) == 0) {
for ( ; count > 3; count -= 4) {
@@ -100,7 +100,7 @@ EXPORT_SYMBOL(memcpy_toio);
* "memset" on IO memory space.
* This needs to be optimized.
*/
-void memset_io(volatile void __iomem *dst, int c, unsigned long count)
+void memset_io(volatile void __iomem *dst, int c, size_t count)
{
while (count) {
count--;
--
2.34.1