|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] xen/arm: Simplify type handling for SMCCC declarations
commit 67bcf5eae7098a8c720550f468c347370acd3eaf
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Tue Feb 24 12:25:45 2026 +0000
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Feb 25 13:06:56 2026 +0000
xen/arm: Simplify type handling for SMCCC declarations
There's no use creating a typed copy of a macro argument, simply to use it
to
create a second typed copy. Remove the indirection, halving the number of
local variables created in scope.
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
---
xen/arch/arm/include/asm/smccc.h | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/xen/arch/arm/include/asm/smccc.h b/xen/arch/arm/include/asm/smccc.h
index 590daf7b27..5fdefc43d9 100644
--- a/xen/arch/arm/include/asm/smccc.h
+++ b/xen/arch/arm/include/asm/smccc.h
@@ -113,39 +113,32 @@ struct arm_smccc_res {
register unsigned long arg0 ASM_REG(0) = (uint32_t)(a0)
#define __declare_arg_1(a0, a1, res) \
- typeof(a1) __a1 = (a1); \
__declare_arg_0(a0, res); \
- register typeof(a1) arg1 ASM_REG(1) = __a1
+ register typeof(a1) arg1 ASM_REG(1) = (a1)
#define __declare_arg_2(a0, a1, a2, res) \
- typeof(a2) __a2 = (a2); \
__declare_arg_1(a0, a1, res); \
- register typeof(a2) arg2 ASM_REG(2) = __a2
+ register typeof(a2) arg2 ASM_REG(2) = (a2)
#define __declare_arg_3(a0, a1, a2, a3, res) \
- typeof(a3) __a3 = (a3); \
__declare_arg_2(a0, a1, a2, res); \
- register typeof(a3) arg3 ASM_REG(3) = __a3
+ register typeof(a3) arg3 ASM_REG(3) = (a3)
#define __declare_arg_4(a0, a1, a2, a3, a4, res) \
- typeof(a4) __a4 = (a4); \
__declare_arg_3(a0, a1, a2, a3, res); \
- register typeof(a4) arg4 ASM_REG(4) = __a4
+ register typeof(a4) arg4 ASM_REG(4) = (a4)
#define __declare_arg_5(a0, a1, a2, a3, a4, a5, res) \
- typeof(a5) __a5 = (a5); \
__declare_arg_4(a0, a1, a2, a3, a4, res); \
- register typeof(a5) arg5 ASM_REG(5) = __a5
+ register typeof(a5) arg5 ASM_REG(5) = (a5)
#define __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res) \
- typeof(a6) __a6 = (a6); \
__declare_arg_5(a0, a1, a2, a3, a4, a5, res); \
- register typeof(a6) arg6 ASM_REG(6) = __a6
+ register typeof(a6) arg6 ASM_REG(6) = (a6)
#define __declare_arg_7(a0, a1, a2, a3, a4, a5, a6, a7, res) \
- typeof(a7) __a7 = (a7); \
__declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res); \
- register typeof(a7) arg7 ASM_REG(7) = __a7
+ register typeof(a7) arg7 ASM_REG(7) = (a7)
#define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
#define __declare_args(count, ...) ___declare_args(count, __VA_ARGS__)
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |