[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] xen/arm: traps: Fix MISRA C 2012 Rule 8.4 violation



commit 355caa9ef29fd4bcdf48bc263e6ca3b24392490b
Author:     Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
AuthorDate: Wed Jul 6 15:11:56 2022 +0300
Commit:     Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Thu Jul 14 12:07:36 2022 +0100

    xen/arm: traps: Fix MISRA C 2012 Rule 8.4 violation
    
    Add the function prototype of show_stack() in <asm/processor.h> header file
    so that it is visible before its definition in traps.c.
    
    Although show_stack() is referenced only in traps.c, it is declared with
    external linkage because, during development, it is often called also by
    other files for debugging purposes. Declaring it static would increase
    development effort. Add appropriate comment
    
    Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
    Acked-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/arch/arm/include/asm/processor.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/arch/arm/include/asm/processor.h 
b/xen/arch/arm/include/asm/processor.h
index 4188ec6bfb..55f56b33bc 100644
--- a/xen/arch/arm/include/asm/processor.h
+++ b/xen/arch/arm/include/asm/processor.h
@@ -558,7 +558,10 @@ extern register_t __cpu_logical_map[];
 void panic_PAR(uint64_t par);
 
 void show_execution_state(const struct cpu_user_regs *regs);
+/* Debugging functions are declared with external linkage to aid development. 
*/
 void show_registers(const struct cpu_user_regs *regs);
+void show_stack(const struct cpu_user_regs *regs);
+
 //#define dump_execution_state() run_in_exception_handler(show_execution_state)
 #define dump_execution_state() WARN()
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.