[PATCH RESEND] x86/asm: Use inout "+" asm onstraint modifiers in __iowrite32_copy()
From: Uros Bizjak
Date: Tue Dec 16 2025 - 05:52:09 EST
Use inout "+" asm constraint modifiers to simplify asm operands.
No functional changes intended.
Signed-off-by: Uros Bizjak <ubizjak@xxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
---
arch/x86/include/asm/io.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index ca309a3227c7..2ea25745e059 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -218,9 +218,8 @@ static inline void __iowrite32_copy(void __iomem *to, const void *from,
size_t count)
{
asm volatile("rep movsl"
- : "=&c"(count), "=&D"(to), "=&S"(from)
- : "0"(count), "1"(to), "2"(from)
- : "memory");
+ : "+D"(to), "+S"(from), "+c"(count)
+ : : "memory");
}
#define __iowrite32_copy __iowrite32_copy
#endif
--
2.52.0