]> www.infradead.org Git - users/dwmw2/linux.git/commit
ata: libata-scsi: Remove struct ata_scsi_args
authorDamien Le Moal <dlemoal@kernel.org>
Tue, 22 Oct 2024 02:45:36 +0000 (11:45 +0900)
committerNiklas Cassel <cassel@kernel.org>
Fri, 25 Oct 2024 08:09:49 +0000 (10:09 +0200)
commit2365278e03916b6b9a65df91e9f7c7afe5a6cf2e
tree99e7f4c96506df031d0ed9e53d7ec537e31aa90f
parent47000e84b3d0630d7d86eeb115894205be68035d
ata: libata-scsi: Remove struct ata_scsi_args

The data structure struct ata_scsi_args is used to pass the target ATA
device, the SCSI command to simulate and the device identification data
to ata_scsi_rbuf_fill() and to its actor function. This method of
passing information does not improve the code in any way and in fact
increases the number of pointer dereferences for no gains.

Drop this data structure by modifying the interface of
ata_scsi_rbuf_fill() and its actor function to take an ATA device and a
SCSI command as argument.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20241022024537.251905-6-dlemoal@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
drivers/ata/libata-scsi.c