Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1460172 > unrolled thread

[PATCH] scsi: Remove unnecessary comparison

Started byPranith Kumar <bobby.prani@gmail.com>
First post2016-08-11 07:10 +0200
Last post2016-08-11 07:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] scsi: Remove unnecessary comparison Pranith Kumar <bobby.prani@gmail.com> - 2016-08-11 07:10 +0200

#1460172 — [PATCH] scsi: Remove unnecessary comparison

FromPranith Kumar <bobby.prani@gmail.com>
Date2016-08-11 07:10 +0200
Subject[PATCH] scsi: Remove unnecessary comparison
Message-ID<s4QpH-6WF-1@gated-at.bofh.it>
val is an unsigned int which makes the comparison >=0
unnecessary. This patch removes it.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 drivers/scsi/sd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index d3e852a..7a919b2 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -314,7 +314,7 @@ protection_type_store(struct device *dev, struct device_attribute *attr,
 	if (err)
 		return err;
 
-	if (val >= 0 && val <= SD_DIF_TYPE3_PROTECTION)
+	if (val <= SD_DIF_TYPE3_PROTECTION)
 		sdkp->protection_type = val;
 
 	return count;
-- 
2.9.2

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web