ata: libata-core: Simplify ata_build_rw_tf()
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Mon, 25 Jul 2022 01:01:27 +0000 (10:01 +0900)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Thu, 25 Aug 2022 22:46:08 +0000 (07:46 +0900)
commit066de3b9d93b6564e2f68005484d8c0597620748
tree8d173fb51ba0b2a9555d662ba402af4472beb550
parente00923c59e68b63c998a0fef4145b5279331968a
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>
drivers/ata/libata-core.c
drivers/ata/libata-scsi.c
drivers/ata/libata.h