xen/common/keyhandler.c | 8 ++++---- xen/include/xen/keyhandler.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
Change types in function declarations to be consistent with the
corresponding definitions.
This addresses 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/common/keyhandler.c | 8 ++++----
xen/include/xen/keyhandler.h | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c
index 0a551033c4..68d8166968 100644
--- a/xen/common/keyhandler.c
+++ b/xen/common/keyhandler.c
@@ -101,8 +101,8 @@ void handle_keypress(unsigned char key, struct cpu_user_regs *regs)
}
}
-void register_keyhandler(unsigned char key, keyhandler_fn_t fn,
- const char *desc, bool_t diagnostic)
+void register_keyhandler(unsigned char key, keyhandler_fn_t *fn,
+ const char *desc, bool diagnostic)
{
BUG_ON(key >= ARRAY_SIZE(key_table)); /* Key in range? */
ASSERT(!key_table[key].fn); /* Clobbering something else? */
@@ -113,8 +113,8 @@ void register_keyhandler(unsigned char key, keyhandler_fn_t fn,
key_table[key].diagnostic = diagnostic;
}
-void register_irq_keyhandler(unsigned char key, irq_keyhandler_fn_t fn,
- const char *desc, bool_t diagnostic)
+void register_irq_keyhandler(unsigned char key, irq_keyhandler_fn_t *fn,
+ const char *desc, bool diagnostic)
{
BUG_ON(key >= ARRAY_SIZE(key_table)); /* Key in range? */
ASSERT(!key_table[key].irq_fn); /* Clobbering something else? */
diff --git a/xen/include/xen/keyhandler.h b/xen/include/xen/keyhandler.h
index 9c5830a037..5c6598af98 100644
--- a/xen/include/xen/keyhandler.h
+++ b/xen/include/xen/keyhandler.h
@@ -39,11 +39,11 @@ void initialize_keytable(void);
void register_keyhandler(unsigned char key,
keyhandler_fn_t *fn,
const char *desc,
- bool_t diagnostic);
+ bool diagnostic);
void register_irq_keyhandler(unsigned char key,
irq_keyhandler_fn_t *fn,
const char *desc,
- bool_t diagnostic);
+ bool diagnostic);
/* Inject a keypress into the key-handling subsystem. */
extern void handle_keypress(unsigned char key, struct cpu_user_regs *regs);
--
2.34.1
On 28/07/2023 5:02 pm, Federico Serafini wrote: > Change types in function declarations to be consistent with the > corresponding definitions. > This addresses 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: Andrew Cooper <andrew.cooper3@citrix.com> Always glad to see more bool_t disappearing.
Hello Andrew, On 28/07/23 18:04, Andrew Cooper wrote: > On 28/07/2023 5:02 pm, Federico Serafini wrote: >> Change types in function declarations to be consistent with the >> corresponding definitions. >> This addresses 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: Andrew Cooper <andrew.cooper3@citrix.com> > > Always glad to see more bool_t disappearing. in the message body I inverted 'definitions' with 'declarations', please can you fix it? Thanks -- Federico Serafini, M.Sc. Software Engineer, BUGSENG (http://bugseng.com)
© 2016 - 2024 Red Hat, Inc.