Commit 87b582ef authored by Manish Pandey's avatar Manish Pandey Committed by TrustedFirmware Code Review
Browse files

Merge "Enable -Wlogical-op always" into integration

parents f67a2977 d7b4cd41
...@@ -246,7 +246,6 @@ WARNING1 += -Wunused-const-variable ...@@ -246,7 +246,6 @@ WARNING1 += -Wunused-const-variable
WARNING2 := -Waggregate-return WARNING2 := -Waggregate-return
WARNING2 += -Wcast-align WARNING2 += -Wcast-align
WARNING2 += -Wnested-externs WARNING2 += -Wnested-externs
WARNING2 += -Wlogical-op
WARNING3 := -Wbad-function-cast WARNING3 := -Wbad-function-cast
WARNING3 += -Wcast-qual WARNING3 += -Wcast-qual
...@@ -268,13 +267,13 @@ endif ...@@ -268,13 +267,13 @@ endif
# Compiler specific warnings # Compiler specific warnings
ifeq ($(findstring clang,$(notdir $(CC))),) ifeq ($(findstring clang,$(notdir $(CC))),)
# not using clang # not using clang
WARNINGS += -Wunused-but-set-variable \ WARNINGS += -Wunused-but-set-variable -Wmaybe-uninitialized \
-Wmaybe-uninitialized \ -Wpacked-bitfield-compat -Wshift-overflow=2 \
-Wpacked-bitfield-compat \ -Wlogical-op
-Wshift-overflow=2
else else
# using clang # using clang
WARNINGS += -Wshift-overflow -Wshift-sign-overflow WARNINGS += -Wshift-overflow -Wshift-sign-overflow \
-Wlogical-op-parentheses
endif endif
ifneq (${E},0) ifneq (${E},0)
......
...@@ -81,14 +81,14 @@ static void mentor_i2c_interrupt_clear(void) ...@@ -81,14 +81,14 @@ static void mentor_i2c_interrupt_clear(void)
udelay(1); udelay(1);
} }
static int mentor_i2c_interrupt_get(void) static bool mentor_i2c_interrupt_get(void)
{ {
uint32_t reg; uint32_t reg;
/* get the interrupt flag bit */ /* get the interrupt flag bit */
reg = mmio_read_32((uintptr_t)&base->control); reg = mmio_read_32((uintptr_t)&base->control);
reg &= I2C_CONTROL_IFLG; reg &= I2C_CONTROL_IFLG;
return reg && I2C_CONTROL_IFLG; return (reg != 0U);
} }
static int mentor_i2c_wait_interrupt(void) static int mentor_i2c_wait_interrupt(void)
......
...@@ -58,7 +58,7 @@ static enum pm_ret_status pm_ioctl_set_rpu_oper_mode(unsigned int mode) ...@@ -58,7 +58,7 @@ static enum pm_ret_status pm_ioctl_set_rpu_oper_mode(unsigned int mode)
{ {
unsigned int val; unsigned int val;
if (mmio_read_32(CRL_APB_RST_LPD_TOP) && CRL_APB_RPU_AMBA_RESET) if (mmio_read_32(CRL_APB_RST_LPD_TOP) & CRL_APB_RPU_AMBA_RESET)
return PM_RET_ERROR_ACCESS; return PM_RET_ERROR_ACCESS;
val = mmio_read_32(ZYNQMP_RPU_GLBL_CNTL); val = mmio_read_32(ZYNQMP_RPU_GLBL_CNTL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment