arch: x86: coding guidelines: cast unused arguments to void
- added missing ARG_UNUSED - added void to cast where ARG_UNUSED macro is not available Signed-off-by: frei tycho <tfrei@baumer.com>
This commit is contained in:
parent
e726dc6403
commit
4b7e09230c
5 changed files with 20 additions and 0 deletions
|
@ -15,6 +15,8 @@ LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
|
|||
*/
|
||||
__weak bool z_x86_do_kernel_nmi(const z_arch_esf_t *esf)
|
||||
{
|
||||
ARG_UNUSED(esf);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,8 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
|
|||
* which is only needed if the stack is not memory mapped.
|
||||
*/
|
||||
z_x86_set_stack_guard(stack);
|
||||
#else
|
||||
ARG_UNUSED(stack);
|
||||
#endif
|
||||
#ifdef CONFIG_USERSPACE
|
||||
switch_entry = z_x86_userspace_prepare_thread(thread);
|
||||
|
@ -68,11 +70,16 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
|
|||
int arch_float_disable(struct k_thread *thread)
|
||||
{
|
||||
/* x86-64 always has FP/SSE enabled so cannot be disabled */
|
||||
ARG_UNUSED(thread);
|
||||
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
int arch_float_enable(struct k_thread *thread, unsigned int options)
|
||||
{
|
||||
/* x86-64 always has FP/SSE enabled so nothing to do here */
|
||||
ARG_UNUSED(thread);
|
||||
ARG_UNUSED(options);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -450,6 +450,8 @@ static inline void assert_addr_aligned(uintptr_t addr)
|
|||
#if __ASSERT_ON
|
||||
__ASSERT((addr & (CONFIG_MMU_PAGE_SIZE - 1)) == 0U,
|
||||
"unaligned address 0x%" PRIxPTR, addr);
|
||||
#else
|
||||
ARG_UNUSED(addr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -481,6 +483,8 @@ static inline void assert_size_aligned(size_t size)
|
|||
#if __ASSERT_ON
|
||||
__ASSERT((size & (CONFIG_MMU_PAGE_SIZE - 1)) == 0U,
|
||||
"unaligned size %zu", size);
|
||||
#else
|
||||
ARG_UNUSED(size);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -828,6 +832,9 @@ static inline pentry_t pte_finalize_value(pentry_t val, bool user_table,
|
|||
get_entry_phys(val, level) != shared_phys_addr) {
|
||||
val = ~val;
|
||||
}
|
||||
#else
|
||||
ARG_UNUSED(user_table);
|
||||
ARG_UNUSED(level);
|
||||
#endif
|
||||
return val;
|
||||
}
|
||||
|
|
|
@ -217,6 +217,8 @@ static inline pentry_t *z_x86_thread_page_tables_get(struct k_thread *thread)
|
|||
*/
|
||||
return z_mem_virt_addr(thread->arch.ptables);
|
||||
}
|
||||
#else
|
||||
ARG_UNUSED(thread);
|
||||
#endif
|
||||
return z_x86_kernel_ptables;
|
||||
}
|
||||
|
|
|
@ -134,6 +134,8 @@ static void disable_hpet(void)
|
|||
*/
|
||||
uintptr_t __abi efi_entry(void *img_handle, struct efi_system_table *sys_tab)
|
||||
{
|
||||
(void)img_handle;
|
||||
|
||||
efi = sys_tab;
|
||||
z_putchar = efi_putchar;
|
||||
printf("*** Zephyr EFI Loader ***\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue