Skip to contentSkip to conversation

slimbus: fix duplicated argument to ||

PATCH In review Hariprasad Kelam 2 participants 2 messages Jul 21, 2019 Serial low-power inter-chip media bus (SLIMbus)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 slimbus: fix duplicated argument to ||

Remove duplicate argument SLIM_MSG_MC_REQUEST_CLEAR_INFORMATION.

fix below issue reported by coccicheck ./drivers/slimbus/slimbus.h:440:3-46: duplicated argument to && or ||

---
 drivers/slimbus/slimbus.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/slimbus/slimbus.h +1 -2
index 9be4108..46a6441 100644
@@ -438,8 +438,7 @@ static inline bool slim_tid_txn(u8 mt, u8 mc)
 	return (mt == SLIM_MSG_MT_CORE &&
 		(mc == SLIM_MSG_MC_REQUEST_INFORMATION ||
 		 mc == SLIM_MSG_MC_REQUEST_CLEAR_INFORMATION ||
-		 mc == SLIM_MSG_MC_REQUEST_VALUE ||
-		 mc == SLIM_MSG_MC_REQUEST_CLEAR_INFORMATION));
+		 mc == SLIM_MSG_MC_REQUEST_VALUE));
 }
 
 static inline bool slim_ec_txn(u8 mt, u8 mc)
Signature · 1 line
2.7.4
#1 lore raw
Quoted 15 lines · Hariprasad Kelam

Remove duplicate argument SLIM_MSG_MC_REQUEST_CLEAR_INFORMATION.

fix below issue reported by coccicheck ./drivers/slimbus/slimbus.h:440:3-46: duplicated argument to && or ||

---
 drivers/slimbus/slimbus.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/slimbus/slimbus.h +0 -0
index 9be4108..46a6441 100644

drivers/slimbus/slimbus.h static inline bool slim_tid_txn(u8 mt, u8 mc) · line 442

Quoted 7 lines
drivers/slimbus/slimbus.h +1 -2
@@ -438,8 +438,7 @@ static inline bool slim_tid_txn(u8 mt, u8 mc)
 	return (mt == SLIM_MSG_MT_CORE &&
 		(mc == SLIM_MSG_MC_REQUEST_INFORMATION ||
 		 mc == SLIM_MSG_MC_REQUEST_CLEAR_INFORMATION ||
-		 mc == SLIM_MSG_MC_REQUEST_VALUE ||
-		 mc == SLIM_MSG_MC_REQUEST_CLEAR_INFORMATION));
+		 mc == SLIM_MSG_MC_REQUEST_VALUE));
 }

Perhaps this was intended to be

		mc ==  SLIM_MSG_MC_REQUEST_CHANGE_VALUE ?