aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen, Kenneth W <kenneth.w.chen@intel.com>2005-07-12 18:57:13 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-07-14 11:25:17 -0400
commit7fce2cf62e4bd9c24717009865ac00940cb664b8 (patch)
tree4868666a6031372d9ad2301b170fef35540dc0ae
parent0f34e3f53378a11c9ecba0f8165da50e8b01d53f (diff)
[SCSI] Redundant this_count check in sd_init_command()
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>
-rw-r--r--drivers/scsi/sd.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index bb8235598787..0410e1bf109a 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -373,9 +373,6 @@ static int sd_init_command(struct scsi_cmnd * SCpnt)
373 SCpnt->cmnd[7] = (unsigned char) (this_count >> 8) & 0xff; 373 SCpnt->cmnd[7] = (unsigned char) (this_count >> 8) & 0xff;
374 SCpnt->cmnd[8] = (unsigned char) this_count & 0xff; 374 SCpnt->cmnd[8] = (unsigned char) this_count & 0xff;
375 } else { 375 } else {
376 if (this_count > 0xff)
377 this_count = 0xff;
378
379 SCpnt->cmnd[1] |= (unsigned char) ((block >> 16) & 0x1f); 376 SCpnt->cmnd[1] |= (unsigned char) ((block >> 16) & 0x1f);
380 SCpnt->cmnd[2] = (unsigned char) ((block >> 8) & 0xff); 377 SCpnt->cmnd[2] = (unsigned char) ((block >> 8) & 0xff);
381 SCpnt->cmnd[3] = (unsigned char) block & 0xff; 378 SCpnt->cmnd[3] = (unsigned char) block & 0xff;