diff mbox series

[XEN] xen/lib: address violations of MISRA C:2012 Rules 8.2 and 8.3

Message ID 18adbd526ec48a83ace2d9049671d3abd2f9c45b.1690873427.git.federico.serafini@bugseng.com (mailing list archive)
State New, archived
Headers show
Series [XEN] xen/lib: address violations of MISRA C:2012 Rules 8.2 and 8.3 | expand

Commit Message

Federico Serafini Aug. 1, 2023, 7:05 a.m. UTC
Give a name to unnamed parameters thus addressing violations of
MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with
named parameters").
Keep consistency between parameter names and types used in function
declarations and the ones used in the corresponding function
definitions, thus addressing violations of MISRA C:2012 Rule 8.3
("All declarations of an object or function shall use the same names
and type qualifiers").

No functional changes.

Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>
---
 xen/include/xen/lib.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Jan Beulich Aug. 1, 2023, 1:45 p.m. UTC | #1
On 01.08.2023 09:05, Federico Serafini wrote:
> Give a name to unnamed parameters thus addressing violations of
> MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with
> named parameters").
> Keep consistency between parameter names and types used in function
> declarations and the ones used in the corresponding function
> definitions, thus addressing violations of MISRA C:2012 Rule 8.3
> ("All declarations of an object or function shall use the same names
> and type qualifiers").
> 
> No functional changes.
> 
> Signed-off-by: Federico Serafini <federico.serafini@bugseng.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

diff --git a/xen/include/xen/lib.h b/xen/include/xen/lib.h
index 359cfdc784..8eef557dd5 100644
--- a/xen/include/xen/lib.h
+++ b/xen/include/xen/lib.h
@@ -78,7 +78,7 @@  debugtrace_printk(const char *fmt, ...) {}
 
 /* Allows us to use '%p' as general-purpose machine-word format char. */
 #define _p(_x) ((void *)(unsigned long)(_x))
-extern void printk(const char *format, ...)
+extern void printk(const char *fmt, ...)
     __attribute__ ((format (printf, 1, 2)));
 
 #define printk_once(fmt, args...)               \
@@ -91,9 +91,9 @@  extern void printk(const char *format, ...)
     }                                           \
 })
 
-extern void guest_printk(const struct domain *d, const char *format, ...)
+extern void guest_printk(const struct domain *d, const char *fmt, ...)
     __attribute__ ((format (printf, 2, 3)));
-extern void noreturn panic(const char *format, ...)
+extern void noreturn panic(const char *fmt, ...)
     __attribute__ ((format (printf, 1, 2)));
 extern int __printk_ratelimit(int ratelimit_ms, int ratelimit_burst);
 extern int printk_ratelimit(void);
@@ -173,7 +173,7 @@  extern char *print_tainted(char *str);
 extern void add_taint(unsigned int taint);
 
 struct cpu_user_regs;
-void cf_check dump_execstate(struct cpu_user_regs *);
+void cf_check dump_execstate(struct cpu_user_regs *regs);
 
 void init_constructors(void);