Commit 922cde06 authored by Abramo Bagnara's avatar Abramo Bagnara Committed by Anas Nashif
Browse files

coding guidelines: comply with MISRA C:2012 Rule 20.9



- avoid to use undefined macros in #if expressions

Signed-off-by: default avatarAbramo Bagnara <abramo.bagnara@bugseng.com>
parent 7229c127
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
	void *swap_entry;
	struct _x86_initial_frame *initial_frame;

#if CONFIG_X86_STACK_PROTECTION
#ifdef CONFIG_X86_STACK_PROTECTION
	z_x86_set_stack_guard(stack);
#endif

+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ void arch_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
	void *switch_entry;
	struct x86_initial_frame *iframe;

#if CONFIG_X86_STACK_PROTECTION
#ifdef CONFIG_X86_STACK_PROTECTION
	z_x86_set_stack_guard(stack);
#else
	ARG_UNUSED(stack);
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ FUNC_NORETURN void z_x86_prep_c(void *arg)
	ARG_UNUSED(info);
#endif

#if CONFIG_X86_STACK_PROTECTION
#ifdef CONFIG_X86_STACK_PROTECTION
	for (int i = 0; i < CONFIG_MP_NUM_CPUS; i++) {
		z_x86_set_stack_guard(z_interrupt_stacks[i]);
	}
+1 −1
Original line number Diff line number Diff line
@@ -1243,7 +1243,7 @@ void z_x86_mmu_init(void)
#endif
}

#if CONFIG_X86_STACK_PROTECTION
#ifdef CONFIG_X86_STACK_PROTECTION
__pinned_func
void z_x86_set_stack_guard(k_thread_stack_t *stack)
{
+1 −1
Original line number Diff line number Diff line
@@ -538,7 +538,7 @@ static void tx_start(const struct device *dev, const uint8_t *buf, size_t len)
{
	NRF_UARTE_Type *uarte = get_uarte_instance(dev);

#if CONFIG_PM_DEVICE
#ifdef CONFIG_PM_DEVICE
	enum pm_device_state state;

	(void)pm_device_state_get(dev, &state);
Loading