Skip to content

Commit

Permalink
ata/acard_ahci: remove unused variable n_elem
Browse files Browse the repository at this point in the history
No one care the varible acard_ahci in func acard_ahci_qc_prep.
better to remove it.

Signed-off-by: Alex Shi <alex.shi@linux.alibaba.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-ide@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Alex Shi authored and Jens Axboe committed Jan 22, 2020
1 parent ffa302e commit 7e053d3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/ata/acard-ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.
Expand Down

0 comments on commit 7e053d3

Please sign in to comment.