linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]  block/sx8 : remove unnecessory check
@ 2018-10-12 16:24 Peng Hao
  0 siblings, 0 replies; only message in thread
From: Peng Hao @ 2018-10-12 16:24 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, linux-kernel, Peng Hao


From: Peng Hao <peng.hao2@zte.com.cn>

TAG_VALID(tag)= ((((tag) & 0xf) == 0xf) && (TAG_DECODE(tag) < 32)).
But '(X & 0x1f) < 0x20(32)' is always true. The second half of
TAG_VALID is unnecessary.

Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
---
 drivers/block/sx8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index 4d90e5e..b8e9ebf 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -75,7 +75,7 @@
 /* 0xf is just arbitrary, non-zero noise; this is sorta like poisoning */
 #define TAG_ENCODE(tag)	(((tag) << 16) | 0xf)
 #define TAG_DECODE(tag)	(((tag) >> 16) & 0x1f)
-#define TAG_VALID(tag)	((((tag) & 0xf) == 0xf) && (TAG_DECODE(tag) < 32))
+#define TAG_VALID(tag)	(((tag) & 0xf) == 0xf)
 
 /* note: prints function name for you */
 #ifdef CARM_DEBUG
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-10-12 16:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-12 16:24 [PATCH] block/sx8 : remove unnecessory check Peng Hao

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).