Skip to content

Commit

Permalink
arch: arc: Fix checks of CONFIG_USERSPACE
Browse files Browse the repository at this point in the history
The compiler generates errors of the form
error: "CONFIG_USERSPACE" is not defined, evaluates to 0 [-Werror=undef]
when -Wundef is used and the config option was turned off.  Change
check to if defined().

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
  • Loading branch information
Bradley Bolen authored and nashif committed May 21, 2019
1 parent 8ce04c5 commit 3950f66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/arc/core/reset.S
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ SECTION_FUNC(TEXT,__start)


/* \todo: MPU init, gp for small data? */ /* \todo: MPU init, gp for small data? */


#if CONFIG_USERSPACE #if defined(CONFIG_USERSPACE)
lr r0, [_ARC_V2_STATUS32] lr r0, [_ARC_V2_STATUS32]
bset r0, r0, _ARC_V2_STATUS32_US_BIT bset r0, r0, _ARC_V2_STATUS32_US_BIT
kflag r0 kflag r0
Expand Down
2 changes: 1 addition & 1 deletion arch/arc/core/thread.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void z_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
char *stackAdjEnd; char *stackAdjEnd;
struct init_stack_frame *pInitCtx; struct init_stack_frame *pInitCtx;


#if CONFIG_USERSPACE #ifdef CONFIG_USERSPACE


size_t stackAdjSize; size_t stackAdjSize;
size_t offset = 0; size_t offset = 0;
Expand Down

0 comments on commit 3950f66

Please sign in to comment.