]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ata,scsi: Remove wrapper ata_sas_port_alloc()
authorNiklas Cassel <cassel@kernel.org>
Wed, 3 Jul 2024 18:44:25 +0000 (20:44 +0200)
committerNiklas Cassel <cassel@kernel.org>
Thu, 4 Jul 2024 09:52:32 +0000 (11:52 +0200)
commit0d3603acffe294ffacaf75b18b46f182b68a50df
tree37db27a0fa40ee6489a07b36d09f2830fbdceb16
parent1228713c75b891291e86c4b1ff0228862fad096a
ata,scsi: Remove wrapper ata_sas_port_alloc()

The ata_sas_port_alloc() wrapper mainly exists in order to export the
internal libata function which it wraps. The secondary reason is that
it initializes some ata_port struct members.

However, ata_sas_port_alloc() is only used in a single location,
sas_ata_init(), which already performs some ata_port struct member
initialization, so it does not make sense to spread this initialization
out over two separate locations.

Thus, remove the wrapper and instead export the libata function directly,
and move the libsas specific ata_port initialization to sas_ata_init(),
which already does some ata_port initialization.

Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20240703184418.723066-19-cassel@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
drivers/ata/libata-core.c
drivers/ata/libata-sata.c
drivers/ata/libata.h
drivers/scsi/libsas/sas_ata.c
include/linux/libata.h