Re: linux-4.8-rc1/drivers/scsi/sd.c:317: pointless test ?

2016-08-08 Thread Laurence Oberman
- Original Message - > From: "David Binderman" > To: j...@linux.vnet.ibm.com, "martin petersen" , > linux-s...@vger.kernel.org, "Linux > Kernel Mailing List" , dcb...@hotmail.com > Sent: Monday, August 8, 2016 9:46:53 AM > Subject: lin

linux-4.8-rc1/drivers/scsi/sd.c:317: pointless test ?

2016-08-08 Thread David Binderman
Hello there, linux-4.8-rc1/drivers/scsi/sd.c:317]: (style) Unsigned variable 'val' can't be negative so it is unnecessary to test it. Source code is if (val >= 0 && val <= SD_DIF_TYPE3_PROTECTION) but unsigned int val; Suggest new code if (val <= SD_DIF_TYPE3_PROTECTION) Regards