]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ata,scsi: Remove wrappers ata_sas_tport_{add,delete}()
authorNiklas Cassel <cassel@kernel.org>
Wed, 3 Jul 2024 18:44:18 +0000 (20:44 +0200)
committerNiklas Cassel <cassel@kernel.org>
Thu, 4 Jul 2024 09:52:31 +0000 (11:52 +0200)
The ata_sas_tport_add() and ata_sas_tport_delete() wrappers only exist in
order to export the internal libata functions which they wrap.
Remove the wrappers and instead export the libata functions directly.

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-12-cassel@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
drivers/ata/libata-sata.c
drivers/ata/libata-transport.c
drivers/ata/libata-transport.h
drivers/scsi/libsas/sas_ata.c
drivers/scsi/libsas/sas_discover.c
include/linux/libata.h

index 9e047bf912b12bdf0d29bc68890755e6a96dd762..e7991595bfe51363dd20b9c56a860f78fc4e9d22 100644 (file)
@@ -1241,18 +1241,6 @@ struct ata_port *ata_sas_port_alloc(struct ata_host *host,
 }
 EXPORT_SYMBOL_GPL(ata_sas_port_alloc);
 
-int ata_sas_tport_add(struct device *parent, struct ata_port *ap)
-{
-       return ata_tport_add(parent, ap);
-}
-EXPORT_SYMBOL_GPL(ata_sas_tport_add);
-
-void ata_sas_tport_delete(struct ata_port *ap)
-{
-       ata_tport_delete(ap);
-}
-EXPORT_SYMBOL_GPL(ata_sas_tport_delete);
-
 /**
  *     ata_sas_device_configure - Default device_configure routine for libata
  *                                devices
index 3e49a877500e124ec36fedb95ae122ca793afec6..d24f201c0ab2cb13c56175b8999b33997a80a07e 100644 (file)
@@ -265,6 +265,7 @@ void ata_tport_delete(struct ata_port *ap)
        transport_destroy_device(dev);
        put_device(dev);
 }
+EXPORT_SYMBOL_GPL(ata_tport_delete);
 
 static const struct device_type ata_port_sas_type = {
        .name = ATA_PORT_TYPE_NAME,
@@ -329,6 +330,7 @@ int ata_tport_add(struct device *parent,
        put_device(dev);
        return error;
 }
+EXPORT_SYMBOL_GPL(ata_tport_add);
 
 /**
  *     ata_port_classify - determine device type based on ATA-spec signature
index 08a57fb9dc6183da08d7c4b8f45309b10dbb503d..50cd2cbe8eea52043d9fff8347054d4a9fce4fc4 100644 (file)
@@ -8,9 +8,6 @@ extern struct scsi_transport_template *ata_scsi_transport_template;
 int ata_tlink_add(struct ata_link *link);
 void ata_tlink_delete(struct ata_link *link);
 
-int ata_tport_add(struct device *parent, struct ata_port *ap);
-void ata_tport_delete(struct ata_port *ap);
-
 struct scsi_transport_template *ata_attach_transport(void);
 void ata_release_transport(struct scsi_transport_template *t);
 
index cbbe43d8ef87bd807e1902c4ffa8b3750f65d862..ab4ddeea4909b1fe893b8f447ee5376760a18d6e 100644 (file)
@@ -608,7 +608,7 @@ int sas_ata_init(struct domain_device *found_dev)
        ap->cbl = ATA_CBL_SATA;
        ap->scsi_host = shost;
 
-       rc = ata_sas_tport_add(ata_host->dev, ap);
+       rc = ata_tport_add(ata_host->dev, ap);
        if (rc)
                goto free_port;
 
index 48d975c6dbf2cd99a8df6e447ac807889e19a51a..951bdc554a1007236c9efba1940db753d1ca5c08 100644 (file)
@@ -300,7 +300,7 @@ void sas_free_device(struct kref *kref)
                kfree(dev->ex_dev.ex_phy);
 
        if (dev_is_sata(dev) && dev->sata_dev.ap) {
-               ata_sas_tport_delete(dev->sata_dev.ap);
+               ata_tport_delete(dev->sata_dev.ap);
                ata_port_free(dev->sata_dev.ap);
                ata_host_put(dev->sata_dev.ata_host);
                dev->sata_dev.ata_host = NULL;
index 7d3bd7c9664ab372f5cf71a360fe0ba91ea889a2..586f0116d1d7e487de467d09588c63ebe9dc87fb 100644 (file)
@@ -1250,8 +1250,8 @@ extern struct ata_port *ata_sas_port_alloc(struct ata_host *,
                                           struct ata_port_info *, struct Scsi_Host *);
 extern void ata_port_probe(struct ata_port *ap);
 extern void ata_port_free(struct ata_port *ap);
-extern int ata_sas_tport_add(struct device *parent, struct ata_port *ap);
-extern void ata_sas_tport_delete(struct ata_port *ap);
+extern int ata_tport_add(struct device *parent, struct ata_port *ap);
+extern void ata_tport_delete(struct ata_port *ap);
 int ata_sas_device_configure(struct scsi_device *sdev, struct queue_limits *lim,
                struct ata_port *ap);
 extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap);