diff options
author | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-07-25 10:01:27 +0900 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-08-26 07:46:08 +0900 |
commit | 066de3b9d93b6564e2f68005484d8c0597620748 (patch) | |
tree | 8d173fb51ba0b2a9555d662ba402af4472beb550 /drivers/ata/libata.h | |
parent | e00923c59e68b63c998a0fef4145b5279331968a (diff) |
ata: libata-core: Simplify ata_build_rw_tf()
Since ata_build_rw_tf() is only called from ata_scsi_rw_xlat() with the
tf, dev and tag arguments obtained from the queued command structure,
we can simplify the interface of ata_build_rw_tf() by passing directly
the qc structure as argument.
Furthermore, since ata_scsi_rw_xlat() is never used for internal
commands, we can also remove the internal tag check for the NCQ case.
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Diffstat (limited to 'drivers/ata/libata.h')
-rw-r--r-- | drivers/ata/libata.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index bc84fbb48c0a..2c5c8273af01 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h @@ -44,9 +44,8 @@ static inline void ata_force_cbl(struct ata_port *ap) { } #endif extern u64 ata_tf_to_lba(const struct ata_taskfile *tf); extern u64 ata_tf_to_lba48(const struct ata_taskfile *tf); -extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev, - u64 block, u32 n_block, unsigned int tf_flags, - unsigned int tag, int class); +extern int ata_build_rw_tf(struct ata_queued_cmd *qc, u64 block, u32 n_block, + unsigned int tf_flags, int class); extern u64 ata_tf_read_block(const struct ata_taskfile *tf, struct ata_device *dev); extern unsigned ata_exec_internal(struct ata_device *dev, |