aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChen, Kenneth W <kenneth.w.chen@intel.com>2005-07-12 20:06:14 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-07-14 11:24:12 -0400
commit0f34e3f53378a11c9ecba0f8165da50e8b01d53f (patch)
tree51249a9aa0443133c0c8eb88c127cf98bed9b37f /drivers
parent2f4701d8274c8663f5c50323dc72fefa24b55091 (diff)
[SCSI] Redundant memset in scsi_alloc_sgtable
scsi_init_io calls scsi_alloc_sgtable and then calls blk_rq_map_sg to initialize the scatterlist structure. blk_rq_map_sg() already memset the structure for every new segment. That makes the memset in scsi_alloc_sgtable unnecessary. Patch to delete the extra memset in scsi_alloc_sgtable. Tested on a x86_64 machine. Looks stable to me. Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/scsi_lib.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 58dcb0534a26..cab535809d0d 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -614,8 +614,6 @@ static struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *cmd, int gfp_mas
614 614
615 sgp = scsi_sg_pools + cmd->sglist_len; 615 sgp = scsi_sg_pools + cmd->sglist_len;
616 sgl = mempool_alloc(sgp->pool, gfp_mask); 616 sgl = mempool_alloc(sgp->pool, gfp_mask);
617 if (sgl)
618 memset(sgl, 0, sgp->size);
619 return sgl; 617 return sgl;
620} 618}
621 619