[SCSI] Redundant this_count check in sd_init_command()
authorChen, Kenneth W <kenneth.w.chen@intel.com>
Tue, 12 Jul 2005 22:57:13 +0000 (15:57 -0700)
committerJames Bottomley <jejb@mulgrave.(none)>
Thu, 14 Jul 2005 15:25:17 +0000 (11:25 -0400)
I was going over the scsi I/O submit path, when sd_init_command
construct the scsi command, this_count is already checked in the
previous else if clause.  Why does it need to check it again in
the last else block?

Patch to delete the spurious check.

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/sd.c

index bb8235598787da5b174196bd2fa453cb5cb7c6d1..0410e1bf109a126726cce9356fd3f51c159e1871 100644 (file)
@@ -373,9 +373,6 @@ static int sd_init_command(struct scsi_cmnd * SCpnt)
                SCpnt->cmnd[7] = (unsigned char) (this_count >> 8) & 0xff;
                SCpnt->cmnd[8] = (unsigned char) this_count & 0xff;
        } else {
-               if (this_count > 0xff)
-                       this_count = 0xff;
-
                SCpnt->cmnd[1] |= (unsigned char) ((block >> 16) & 0x1f);
                SCpnt->cmnd[2] = (unsigned char) ((block >> 8) & 0xff);
                SCpnt->cmnd[3] = (unsigned char) block & 0xff;