aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-11-14 08:35:43 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-01 22:45:57 -0500
commit61c0596c5fbef99df5518ae449be4ab49a2c2233 (patch)
treef9adba2444b07c54bb4561f6b8b85e148f70657b /drivers
parent8a93758170a58b5afe3e45d7d5bebbdd401a24c2 (diff)
[PATCH] libata: trivial updates to ata_sg_init_one()
There's no need to memset &qc->sgent manually, sg_init_one() clears sgent inside it. Also, kill not-so-necessary sg local variable. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/libata-core.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 21f8d61e5879..a52c07198839 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3491,19 +3491,15 @@ void ata_noop_qc_prep(struct ata_queued_cmd *qc) { }
3491 3491
3492void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen) 3492void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen)
3493{ 3493{
3494 struct scatterlist *sg;
3495
3496 qc->flags |= ATA_QCFLAG_SINGLE; 3494 qc->flags |= ATA_QCFLAG_SINGLE;
3497 3495
3498 memset(&qc->sgent, 0, sizeof(qc->sgent));
3499 qc->__sg = &qc->sgent; 3496 qc->__sg = &qc->sgent;
3500 qc->n_elem = 1; 3497 qc->n_elem = 1;
3501 qc->orig_n_elem = 1; 3498 qc->orig_n_elem = 1;
3502 qc->buf_virt = buf; 3499 qc->buf_virt = buf;
3503 qc->nbytes = buflen; 3500 qc->nbytes = buflen;
3504 3501
3505 sg = qc->__sg; 3502 sg_init_one(&qc->sgent, buf, buflen);
3506 sg_init_one(sg, buf, buflen);
3507} 3503}
3508 3504
3509/** 3505/**