* [PATCH] libata: trivial updates to ata_sg_init_one()
@ 2006-11-14 13:35 Tejun Heo
2006-11-14 19:26 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2006-11-14 13:35 UTC (permalink / raw)
To: Jeff Garzik, linux-ide
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>
---
drivers/ata/libata-core.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 9fdb266..994bc27 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3475,19 +3475,15 @@ void ata_noop_qc_prep(struct ata_queued_
void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, unsigned int buflen)
{
- struct scatterlist *sg;
-
qc->flags |= ATA_QCFLAG_SINGLE;
- memset(&qc->sgent, 0, sizeof(qc->sgent));
qc->__sg = &qc->sgent;
qc->n_elem = 1;
qc->orig_n_elem = 1;
qc->buf_virt = buf;
qc->nbytes = buflen;
- sg = qc->__sg;
- sg_init_one(sg, buf, buflen);
+ sg_init_one(&qc->sgent, buf, buflen);
}
/**
--
1.4.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-14 19:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-14 13:35 [PATCH] libata: trivial updates to ata_sg_init_one() Tejun Heo
2006-11-14 19:26 ` Jeff Garzik
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.