Skip to contentSkip to conversation

libata: kill now unused n_iter and fix sata_fsl

PATCH Applied Tejun Heo 2 participants 2 messages Feb 5, 2008 – Feb 6, 2008 libata

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

From: James Bottomley <[email protected]>

qc->n_iter was used for libata's own sg walking before sg chaining replaced it. During conversion, the field and its usage in sata_fsl were left behind. Kill the filed and update sata_fsl.

tj: This was part of James's libata-use-block-layer-padding patch.
Separated out by me.

---
 drivers/ata/sata_fsl.c |    4 ++--
 include/linux/libata.h |    2 --
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/ata/sata_fsl.c +2 -2
Index: work/drivers/ata/sata_fsl.c
===================================================================
@@ -355,8 +355,8 @@ static unsigned int sata_fsl_fill_sg(str
 			ata_port_printk(qc->ap, KERN_ERR,
 					"s/g len unaligned : 0x%x\n", sg_len);
 
-		if ((num_prde == (SATA_FSL_MAX_PRD_DIRECT - 1)) &&
-		    (qc->n_iter + 1 != qc->n_elem)) {
+		if (num_prde == (SATA_FSL_MAX_PRD_DIRECT - 1) &&
+		    sg_next(sg) != NULL) {
 			VPRINTK("setting indirect prde\n");
 			prd_ptr_to_indirect_ext = prd;
 			prd->dba = cpu_to_le32(indirect_ext_segment_paddr);
include/linux/libata.h +0 -2
Index: work/include/linux/libata.h
===================================================================
@@ -457,7 +457,6 @@ struct ata_queued_cmd {
 	unsigned long		flags;		/* ATA_QCFLAG_xxx */
 	unsigned int		tag;
 	unsigned int		n_elem;
-	unsigned int		n_iter;
 	unsigned int		mapped_n_elem;
 
 	int			dma_dir;
@@ -1367,7 +1366,6 @@ static inline void ata_qc_reinit(struct 
 	qc->nbytes = qc->raw_nbytes = qc->curbytes = 0;
 	qc->n_elem = 0;
 	qc->mapped_n_elem = 0;
-	qc->n_iter = 0;
 	qc->err_mask = 0;
 	qc->pad_len = 0;
 	qc->last_sg = NULL;
Applied
#1 lore raw
Quoted 6 lines · Tejun Heo

From: James Bottomley <[email protected]>

qc->n_iter was used for libata's own sg walking before sg chaining replaced it. During conversion, the field and its usage in sata_fsl were left behind. Kill the filed and update sata_fsl.

Quoted 6 lines

tj: This was part of James's libata-use-block-layer-padding patch.
Separated out by me.

applied