summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2017-08-25 13:46:35 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2017-08-25 17:08:08 -0400
commit830cc351bc3c7f867daf92f17992bca34a647d8c (patch)
treebd678a8a902c6c113e5202ad01dd2c1fa9eaf433 /drivers/scsi/sd.c
parented91f7ed38a57df422590b0250ae9ab678197777 (diff)
downloadtalos-op-linux-830cc351bc3c7f867daf92f17992bca34a647d8c.tar.gz
talos-op-linux-830cc351bc3c7f867daf92f17992bca34a647d8c.zip
scsi: sd: Remove a useless comparison
This patch avoids that gcc reports the following warning when building with W=1: drivers/scsi/sd.c:315:10: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] if (val >= 0 && val <= T10_PI_TYPE3_PROTECTION) Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Cc: Christoph Hellwig <hch@lst.de> Cc: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 8b3d7994e182..7c0f9eb5a5fd 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -312,7 +312,7 @@ protection_type_store(struct device *dev, struct device_attribute *attr,
if (err)
return err;
- if (val >= 0 && val <= T10_PI_TYPE3_PROTECTION)
+ if (val <= T10_PI_TYPE3_PROTECTION)
sdkp->protection_type = val;
return count;
OpenPOWER on IntegriCloud