From: Mark Haverkamp Date: Wed, 10 May 2006 16:12:05 +0000 (-0700) Subject: [SCSI] aacraid: optimize sg alloc X-Git-Tag: v2.6.18-rc1~1092^2~66 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3c1e0cca9469bd19590ade25f6d9f94da2710d5b;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git [SCSI] aacraid: optimize sg alloc Received From Mark Salyzyn Slight space and speed efficiency improvement. Signed-off-by: Mark Haverkamp Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 642a3b4..5d29897 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -2218,15 +2218,15 @@ static unsigned long aac_build_sg(struct scsi_cmnd* scsicmd, struct sgmap* psg) } } else if(scsicmd->request_bufflen) { - dma_addr_t addr; - addr = pci_map_single(dev->pdev, + u32 addr; + scsicmd->SCp.dma_handle = pci_map_single(dev->pdev, scsicmd->request_buffer, scsicmd->request_bufflen, scsicmd->sc_data_direction); + addr = scsicmd->SCp.dma_handle; psg->count = cpu_to_le32(1); psg->sg[0].addr = cpu_to_le32(addr); psg->sg[0].count = cpu_to_le32(scsicmd->request_bufflen); - scsicmd->SCp.dma_handle = addr; byte_count = scsicmd->request_bufflen; } return byte_count;