linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s390: Simplify the calculation of variables
@ 2022-03-28  2:36 Haowen Bai
  2022-03-28  5:37 ` kernel test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Haowen Bai @ 2022-03-28  2:36 UTC (permalink / raw)
  To: hca, gor, agordeev, borntraeger, svens
  Cc: linux-s390, linux-kernel, Haowen Bai

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

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
 arch/s390/include/asm/scsw.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/s390/include/asm/scsw.h b/arch/s390/include/asm/scsw.h
index a7c3ccf..f2baac8 100644
--- a/arch/s390/include/asm/scsw.h
+++ b/arch/s390/include/asm/scsw.h
@@ -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))
 }
 
 /**
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [PATCH V2] s390: Simplify the calculation of variables
@ 2022-03-28  6:19 Haowen Bai
  0 siblings, 0 replies; 13+ messages in thread
From: Haowen Bai @ 2022-03-28  6:19 UTC (permalink / raw)
  To: hca, gor, agordeev, borntraeger, svens
  Cc: linux-s390, linux-kernel, Haowen Bai

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

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
V1->V2: fix build error

 arch/s390/include/asm/scsw.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/s390/include/asm/scsw.h b/arch/s390/include/asm/scsw.h
index a7c3ccf..f2baac8 100644
--- a/arch/s390/include/asm/scsw.h
+++ b/arch/s390/include/asm/scsw.h
@@ -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));
 }
 
 /**
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-04-08 14:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-28  2:36 [PATCH] s390: Simplify the calculation of variables Haowen Bai
2022-03-28  5:37 ` kernel test robot
2022-03-28  6:08 ` kernel test robot
2022-03-28 12:15 ` David Laight
2022-04-04  9:10   ` Heiko Carstens
2022-04-06  2:37     ` [PATCH V2] " Haowen Bai
2022-04-06  8:45       ` Heiko Carstens
2022-04-06 16:44         ` Peter Oberparleiter
2022-04-07  2:16           ` [PATCH V3] " Haowen Bai
2022-04-08 12:53             ` Peter Oberparleiter
2022-04-08 14:32               ` Heiko Carstens
2022-04-07  2:19           ` [PATCH V2] " baihaowen
2022-03-28  6:19 Haowen Bai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).