Skip to content

Commit c10bc56

Browse files
committed
ata,scsi: Remove wrappers ata_sas_tport_{add,delete}()
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 <[email protected]> Reviewed-by: John Garry <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Niklas Cassel <[email protected]>
1 parent 831d83a commit c10bc56

File tree

6 files changed

+6
-19
lines changed

6 files changed

+6
-19
lines changed

drivers/ata/libata-sata.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,18 +1241,6 @@ struct ata_port *ata_sas_port_alloc(struct ata_host *host,
12411241
}
12421242
EXPORT_SYMBOL_GPL(ata_sas_port_alloc);
12431243

1244-
int ata_sas_tport_add(struct device *parent, struct ata_port *ap)
1245-
{
1246-
return ata_tport_add(parent, ap);
1247-
}
1248-
EXPORT_SYMBOL_GPL(ata_sas_tport_add);
1249-
1250-
void ata_sas_tport_delete(struct ata_port *ap)
1251-
{
1252-
ata_tport_delete(ap);
1253-
}
1254-
EXPORT_SYMBOL_GPL(ata_sas_tport_delete);
1255-
12561244
/**
12571245
* ata_sas_device_configure - Default device_configure routine for libata
12581246
* devices

drivers/ata/libata-transport.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ void ata_tport_delete(struct ata_port *ap)
265265
transport_destroy_device(dev);
266266
put_device(dev);
267267
}
268+
EXPORT_SYMBOL_GPL(ata_tport_delete);
268269

269270
static const struct device_type ata_port_sas_type = {
270271
.name = ATA_PORT_TYPE_NAME,
@@ -329,6 +330,7 @@ int ata_tport_add(struct device *parent,
329330
put_device(dev);
330331
return error;
331332
}
333+
EXPORT_SYMBOL_GPL(ata_tport_add);
332334

333335
/**
334336
* ata_port_classify - determine device type based on ATA-spec signature

drivers/ata/libata-transport.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ extern struct scsi_transport_template *ata_scsi_transport_template;
88
int ata_tlink_add(struct ata_link *link);
99
void ata_tlink_delete(struct ata_link *link);
1010

11-
int ata_tport_add(struct device *parent, struct ata_port *ap);
12-
void ata_tport_delete(struct ata_port *ap);
13-
1411
struct scsi_transport_template *ata_attach_transport(void);
1512
void ata_release_transport(struct scsi_transport_template *t);
1613

drivers/scsi/libsas/sas_ata.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ int sas_ata_init(struct domain_device *found_dev)
608608
ap->cbl = ATA_CBL_SATA;
609609
ap->scsi_host = shost;
610610

611-
rc = ata_sas_tport_add(ata_host->dev, ap);
611+
rc = ata_tport_add(ata_host->dev, ap);
612612
if (rc)
613613
goto free_port;
614614

drivers/scsi/libsas/sas_discover.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ void sas_free_device(struct kref *kref)
300300
kfree(dev->ex_dev.ex_phy);
301301

302302
if (dev_is_sata(dev) && dev->sata_dev.ap) {
303-
ata_sas_tport_delete(dev->sata_dev.ap);
303+
ata_tport_delete(dev->sata_dev.ap);
304304
ata_port_free(dev->sata_dev.ap);
305305
ata_host_put(dev->sata_dev.ata_host);
306306
dev->sata_dev.ata_host = NULL;

include/linux/libata.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,8 +1250,8 @@ extern struct ata_port *ata_sas_port_alloc(struct ata_host *,
12501250
struct ata_port_info *, struct Scsi_Host *);
12511251
extern void ata_port_probe(struct ata_port *ap);
12521252
extern void ata_port_free(struct ata_port *ap);
1253-
extern int ata_sas_tport_add(struct device *parent, struct ata_port *ap);
1254-
extern void ata_sas_tport_delete(struct ata_port *ap);
1253+
extern int ata_tport_add(struct device *parent, struct ata_port *ap);
1254+
extern void ata_tport_delete(struct ata_port *ap);
12551255
int ata_sas_device_configure(struct scsi_device *sdev, struct queue_limits *lim,
12561256
struct ata_port *ap);
12571257
extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap);

0 commit comments

Comments
 (0)