Add missing parameter name "regs" and introduce function type
bug_fn_t: this improves readability and helps to validate that the
function passed to run_in_exception_handle() has the expected
prototype.
No functional change.

Suggested-by: Julien Grall <jul...@xen.org>
Signed-off-by: Federico Serafini <federico.seraf...@bugseng.com>
---
Changes in v2:
  - adjusted tag;
  - avoided exceeding the 80-character limit.
---
 xen/arch/arm/traps.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index ce89f16404..1264eab087 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -1236,7 +1236,8 @@ int do_bug_frame(const struct cpu_user_regs *regs, 
vaddr_t pc)
 
     if ( id == BUGFRAME_run_fn )
     {
-        void (*fn)(const struct cpu_user_regs *) = (void *)regs->BUG_FN_REG;
+        typedef void (*bug_fn_t)(const struct cpu_user_regs *regs);
+        bug_fn_t fn = (void *)regs->BUG_FN_REG;
 
         fn(regs);
         return 0;
-- 
2.34.1


Reply via email to