misra: Fixes for MISRA-C rule 8.2
In C90 was introduced function prototype, that allows argument types
to be checked against parameter types, though it is not necessary
specify names for the parameters. MISRA-C requires names for function
prototype parameters, it claims that names can provide useful
information regarding the function interface.
MISRA-C rule 8.2
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
diff --git a/arch/x86/core/irq_manage.c b/arch/x86/core/irq_manage.c
index 2f5b85c..52070a5 100644
--- a/arch/x86/core/irq_manage.c
+++ b/arch/x86/core/irq_manage.c
@@ -24,8 +24,8 @@
#include <kswap.h>
#include <arch/x86/segmentation.h>
-extern void _SpuriousIntHandler(void *);
-extern void _SpuriousIntNoErrCodeHandler(void *);
+extern void _SpuriousIntHandler(void *handler);
+extern void _SpuriousIntNoErrCodeHandler(void *handler);
/*
* Place the addresses of the spurious interrupt handlers into the intList
diff --git a/arch/x86/include/cache_private.h b/arch/x86/include/cache_private.h
index 9eaa0c6..c53a9e9 100644
--- a/arch/x86/include/cache_private.h
+++ b/arch/x86/include/cache_private.h
@@ -14,7 +14,7 @@
#endif
extern int _is_clflush_available(void);
-extern void _cache_flush_wbinvd(vaddr_t, size_t);
+extern void _cache_flush_wbinvd(vaddr_t addr, size_t len);
extern size_t _cache_line_size_get(void);
#ifdef __cplusplus
diff --git a/include/kernel.h b/include/kernel.h
index 62b4c58..d52a7b3 100644
--- a/include/kernel.h
+++ b/include/kernel.h
@@ -1316,10 +1316,10 @@
_wait_q_t wait_q;
/* runs in ISR context */
- void (*expiry_fn)(struct k_timer *);
+ void (*expiry_fn)(struct k_timer *timer);
/* runs in the context of the thread that calls k_timer_stop() */
- void (*stop_fn)(struct k_timer *);
+ void (*stop_fn)(struct k_timer *timer);
/* timer period */
s32_t period;
@@ -4907,7 +4907,7 @@
* @param arg Untyped argument to be passed to "fn"
*/
extern void _arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz,
- void (*fn)(int, void *), void *arg);
+ void (*fn)(int key, void *data), void *arg);
#ifdef __cplusplus
}
diff --git a/include/misc/dlist.h b/include/misc/dlist.h
index 3733cda..937a55c 100644
--- a/include/misc/dlist.h
+++ b/include/misc/dlist.h
@@ -471,7 +471,7 @@
*/
static inline void sys_dlist_insert_at(sys_dlist_t *list, sys_dnode_t *node,
- int (*cond)(sys_dnode_t *, void *), void *data)
+ int (*cond)(sys_dnode_t *node, void *data), void *data)
{
if (sys_dlist_is_empty(list)) {
sys_dlist_append(list, node);
diff --git a/include/misc/printk.h b/include/misc/printk.h
index c5749ad..63746b8 100644
--- a/include/misc/printk.h
+++ b/include/misc/printk.h
@@ -49,7 +49,7 @@
extern __printf_like(3, 0) int vsnprintk(char *str, size_t size,
const char *fmt, va_list ap);
-extern __printf_like(3, 0) void _vprintk(int (*out)(int, void *), void *ctx,
+extern __printf_like(3, 0) void _vprintk(int (*out)(int f, void *c), void *ctx,
const char *fmt, va_list ap);
#else
static inline __printf_like(1, 2) void printk(const char *fmt, ...)
diff --git a/kernel/timer.c b/kernel/timer.c
index 5363ffa..78d4332 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -93,8 +93,8 @@
void k_timer_init(struct k_timer *timer,
- void (*expiry_fn)(struct k_timer *),
- void (*stop_fn)(struct k_timer *))
+ void (*expiry_fn)(struct k_timer *t),
+ void (*stop_fn)(struct k_timer *t))
{
timer->expiry_fn = expiry_fn;
timer->stop_fn = stop_fn;