[Skiboot] [PATCH v2 10/11] imc: Remove extra parentheses in test

Joel Stanley joel at jms.id.au
Fri May 4 12:10:35 AEST 2018


These make clang angry:

hw/imc.c:690:29: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
                        if ((wakeup_engine_state == WAKEUP_ENGINE_PRESENT)) {
                             ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
hw/imc.c:690:29: note: remove extraneous parentheses around the comparison to silence this warning
                        if ((wakeup_engine_state == WAKEUP_ENGINE_PRESENT)) {
                            ~                    ^                       ~
Signed-off-by: Joel Stanley <joel at jms.id.au>

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 hw/imc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/imc.c b/hw/imc.c
index c567429ec5f4..3392eaf10f19 100644
--- a/hw/imc.c
+++ b/hw/imc.c
@@ -687,7 +687,7 @@ static int64_t opal_imc_counters_init(uint32_t type, uint64_t addr, uint64_t cpu
 		}
 
 		if (has_deep_states) {
-			if ((wakeup_engine_state == WAKEUP_ENGINE_PRESENT)) {
+			if (wakeup_engine_state == WAKEUP_ENGINE_PRESENT) {
 				struct proc_chip *chip = get_chip(c->chip_id);
 
 				prlog(PR_INFO, "Configuring stopapi for IMC\n");
-- 
2.17.0



More information about the Skiboot mailing list