Skip to contentSkip to conversation

s390: Simplify the calculation of variables

PATCH New Jiapeng Chong 1 participant 1 message Mar 1, 2021 s390

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390: Simplify the calculation of variables

Fix the following coccicheck warnings:

./arch/s390/include/asm/scsw.h:695:47-49: WARNING !A || A && B is equivalent to !A || B.

---
 arch/s390/include/asm/scsw.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/s390/include/asm/scsw.h +1 -2
index a7c3ccf..343b50f 100644
@@ -692,8 +692,7 @@ static inline int scsw_tm_is_valid_pno(union scsw *scsw)
 	return (scsw->tm.fctl != 0) &&
 	       (scsw->tm.stctl & SCSW_STCTL_STATUS_PEND) &&
 	       (!(scsw->tm.stctl & SCSW_STCTL_INTER_STATUS) ||
-		 ((scsw->tm.stctl & SCSW_STCTL_INTER_STATUS) &&
-		  (scsw->tm.actl & SCSW_ACTL_SUSPENDED)));
+		  (scsw->tm.actl & SCSW_ACTL_SUSPENDED));
 }
 
 /**
Signature · 1 line
1.8.3.1