soc: arm: Make statements evaluate boolean expressions
MISRA-C requires that the if statement has essentially Boolean type. MISRA-C rule 14.4 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
353933125f
commit
359adfc959
9 changed files with 20 additions and 20 deletions
|
@ -133,11 +133,11 @@ static int imxrt_init(struct device *arg)
|
|||
oldLevel = irq_lock();
|
||||
|
||||
/* Watchdog disable */
|
||||
if (WDOG1->WCR & WDOG_WCR_WDE_MASK) {
|
||||
if ((WDOG1->WCR & WDOG_WCR_WDE_MASK) != 0) {
|
||||
WDOG1->WCR &= ~WDOG_WCR_WDE_MASK;
|
||||
}
|
||||
|
||||
if (WDOG2->WCR & WDOG_WCR_WDE_MASK) {
|
||||
if ((WDOG2->WCR & WDOG_WCR_WDE_MASK) != 0) {
|
||||
WDOG2->WCR &= ~WDOG_WCR_WDE_MASK;
|
||||
}
|
||||
|
||||
|
@ -147,12 +147,12 @@ static int imxrt_init(struct device *arg)
|
|||
| RTWDOG_CS_UPDATE_MASK;
|
||||
|
||||
/* Disable Systick which might be enabled by bootrom */
|
||||
if (SysTick->CTRL & SysTick_CTRL_ENABLE_Msk) {
|
||||
if ((SysTick->CTRL & SysTick_CTRL_ENABLE_Msk) != 0) {
|
||||
SysTick->CTRL &= ~SysTick_CTRL_ENABLE_Msk;
|
||||
}
|
||||
|
||||
SCB_EnableICache();
|
||||
if (!(SCB->CCR & SCB_CCR_DC_Msk)) {
|
||||
if ((SCB->CCR & SCB_CCR_DC_Msk) == 0) {
|
||||
SCB_EnableDCache();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue