Skip to contentSkip to conversation

ata/acard_ahci: remove unused variable n_elem

PATCH Applied Alex Shi 2 participants 2 messages Jan 21, 2020 – Jan 22, 2020 libata

lore
Share & tools
lore

Alex Shi

author
#0 lore raw

PATCH 1/1 ata/acard_ahci: remove unused variable n_elem

No one care the varible acard_ahci in func acard_ahci_qc_prep. better to remove it.

---
 drivers/ata/acard-ahci.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/ata/acard-ahci.c +1 -3
index 46dc54d18f0b..2a04e8abd397 100644
@@ -218,7 +218,6 @@ static enum ata_completion_errors acard_ahci_qc_prep(struct ata_queued_cmd *qc)
 	void *cmd_tbl;
 	u32 opts;
 	const u32 cmd_fis_len = 5; /* five dwords */
-	unsigned int n_elem;
 
 	/*
 	 * Fill in command table information.  First, the header,
@@ -232,9 +231,8 @@ static enum ata_completion_errors acard_ahci_qc_prep(struct ata_queued_cmd *qc)
 		memcpy(cmd_tbl + AHCI_CMD_TBL_CDB, qc->cdb, qc->dev->cdb_len);
 	}
 
-	n_elem = 0;
 	if (qc->flags & ATA_QCFLAG_DMAMAP)
-		n_elem = acard_ahci_fill_sg(qc, cmd_tbl);
+		acard_ahci_fill_sg(qc, cmd_tbl);
 
 	/*
 	 * Fill in command slot information.
Signature · 1 line
1.8.3.1
Applied
#1 lore raw
Quoted 2 lines · Alex Shi

No one care the varible acard_ahci in func acard_ahci_qc_prep. better to remove it.

Applied, thanks.

Signature · 1 line
Jens Axboe