diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2023-04-19 10:08:36 +0200 |
---|---|---|
committer | Lean Sheng Tan <sheng.tan@9elements.com> | 2023-05-13 17:18:40 +0000 |
commit | e9d9c1e89857498cf6cbcc9bb61283aadb665802 (patch) | |
tree | d33f3dd96d7b3442a42c76f77ba8875ee859e310 /src/vendorcode/mediatek/mt8195/include | |
parent | 94efac50eff3993e63547669ddb9cfc339f70ad2 (diff) |
vendorcode/mediatek/mt8195: Fix set but unused variables
The clang compiler warns about this.
Change-Id: I1584258aa24d6a0bf558b3c622bc53c156a37b09
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74548
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Diffstat (limited to 'src/vendorcode/mediatek/mt8195/include')
-rw-r--r-- | src/vendorcode/mediatek/mt8195/include/dramc_common.h | 7 | ||||
-rw-r--r-- | src/vendorcode/mediatek/mt8195/include/x_hal_io.h | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/vendorcode/mediatek/mt8195/include/dramc_common.h b/src/vendorcode/mediatek/mt8195/include/dramc_common.h index 0da3525c4b..393612c77d 100644 --- a/src/vendorcode/mediatek/mt8195/include/dramc_common.h +++ b/src/vendorcode/mediatek/mt8195/include/dramc_common.h @@ -73,6 +73,7 @@ /* mcSHOW_DBG_MSG3: Medium Low */ /* mcSHOW_DBG_MSG4: Low */ /**********************************************/ + #if __FLASH_TOOL_DA__ #define printf DBG_MSG #define print DBG_MSG @@ -246,10 +247,10 @@ #define mcSHOW_TIME_MSG(_x_) #define mcSHOW_ERR_MSG(_x_) {print _x_;} #else - #define mcSHOW_DBG_MSG(_x_) - #define mcSHOW_DBG_MSG2(_x_) + #define mcSHOW_DBG_MSG(_x_) { if (0) { print _x_; } } + #define mcSHOW_DBG_MSG2(_x_) { if (0) { print _x_; } } #define mcSHOW_DBG_MSG3(_x_) - #define mcSHOW_DBG_MSG4(_x_) + #define mcSHOW_DBG_MSG4(_x_) { if (0) { print _x_; } } #define mcSHOW_DBG_MSG5(_x_) #define mcSHOW_DBG_MSG6(_x_) #define mcSHOW_JV_LOG_MSG(_x_) diff --git a/src/vendorcode/mediatek/mt8195/include/x_hal_io.h b/src/vendorcode/mediatek/mt8195/include/x_hal_io.h index 5989ec8b9f..184dd7a7a0 100644 --- a/src/vendorcode/mediatek/mt8195/include/x_hal_io.h +++ b/src/vendorcode/mediatek/mt8195/include/x_hal_io.h @@ -46,7 +46,7 @@ extern void vIO32Write4BMsk_All2(DRAMC_CTX_T *p, U32 reg32, U32 val32, U32 msk32 extern void vIO32Write4B_All2(DRAMC_CTX_T *p, U32 reg32, U32 val32); // ========================= -// public Macro for general use. +// public Macro for general use. //========================== #define u4IO32Read4B(reg32) u4Dram_Register_Read(p, reg32) #define vIO32Write4B(reg32, val32) ucDram_Register_Write(p, reg32, val32) @@ -65,6 +65,7 @@ extern void vIO32Write4B_All2(DRAMC_CTX_T *p, U32 reg32, U32 val32); UINT16 upk = 1; \ INT32 msk = (INT32)(list); \ { upk = 0; \ + (void)upk; \ ((U32)msk == 0xffffffff)? (vIO32Write4B(reg32, (list))): (((U32)msk)? vIO32Write4BMsk(reg32, (list), ((U32)msk)):(U32)0); \ } \ }/*lint -restore */ @@ -80,6 +81,7 @@ extern void vIO32Write4B_All2(DRAMC_CTX_T *p, U32 reg32, U32 val32); UINT16 upk = 1; \ INT32 msk = (INT32)(list); \ { upk = 0; \ + (void)upk; \ ((U32)msk == 0xffffffff)? (vIO32Write4B_All(reg32, (list))): (((U32)msk)? vIO32Write4BMsk_All(reg32, (list), ((U32)msk)): (void)0); \ } \ }/*lint -restore */ |