Skip to content

Commit a76f1b6

Browse files
hreineckedamien-lemoal
authored andcommitted
ata,scsi: cleanup __ata_port_probe()
Rename __ata_port_probe() to ata_port_probe() and drop the wrapper ata_sas_async_probe(). Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Jason Yan <yanaijie@huawei.com> Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
1 parent 77461a3 commit a76f1b6

6 files changed

Lines changed: 6 additions & 20 deletions

File tree

drivers/ata/libata-core.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5865,7 +5865,7 @@ void ata_host_init(struct ata_host *host, struct device *dev,
58655865
}
58665866
EXPORT_SYMBOL_GPL(ata_host_init);
58675867

5868-
void __ata_port_probe(struct ata_port *ap)
5868+
void ata_port_probe(struct ata_port *ap)
58695869
{
58705870
struct ata_eh_info *ehi = &ap->link.eh_info;
58715871
unsigned long flags;
@@ -5883,6 +5883,7 @@ void __ata_port_probe(struct ata_port *ap)
58835883

58845884
spin_unlock_irqrestore(ap->lock, flags);
58855885
}
5886+
EXPORT_SYMBOL_GPL(ata_port_probe);
58865887

58875888
static void async_port_probe(void *data, async_cookie_t cookie)
58885889
{
@@ -5898,7 +5899,7 @@ static void async_port_probe(void *data, async_cookie_t cookie)
58985899
if (!(ap->host->flags & ATA_HOST_PARALLEL_SCAN) && ap->port_no != 0)
58995900
async_synchronize_cookie(cookie);
59005901

5901-
__ata_port_probe(ap);
5902+
ata_port_probe(ap);
59025903
ata_port_wait_eh(ap);
59035904

59045905
/* in order to keep device order, we need to synchronize at this point */

drivers/ata/libata-sata.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,19 +1144,6 @@ struct ata_port *ata_sas_port_alloc(struct ata_host *host,
11441144
}
11451145
EXPORT_SYMBOL_GPL(ata_sas_port_alloc);
11461146

1147-
/**
1148-
* ata_sas_async_probe - simply schedule probing and return
1149-
* @ap: Port to probe
1150-
*
1151-
* For batch scheduling of probe for sas attached ata devices, assumes
1152-
* the port has already been through ata_sas_port_init()
1153-
*/
1154-
void ata_sas_async_probe(struct ata_port *ap)
1155-
{
1156-
__ata_port_probe(ap);
1157-
}
1158-
EXPORT_SYMBOL_GPL(ata_sas_async_probe);
1159-
11601147
/**
11611148
* ata_sas_port_init - Initialize a SATA device
11621149
* @ap: SATA port to initialize

drivers/ata/libata.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ extern int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg);
7878
extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg);
7979
extern struct ata_port *ata_port_alloc(struct ata_host *host);
8080
extern const char *sata_spd_string(unsigned int spd);
81-
extern int ata_port_probe(struct ata_port *ap);
82-
extern void __ata_port_probe(struct ata_port *ap);
8381
extern unsigned int ata_read_log_page(struct ata_device *dev, u8 log,
8482
u8 page, void *buf, unsigned int sectors);
8583

drivers/scsi/hisi_sas/hisi_sas_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ static int hisi_sas_init_device(struct domain_device *device)
787787
* However we don't need to issue a hard reset here for these
788788
* reasons:
789789
* a. When probing the device, libsas/libata already issues a
790-
* hard reset in sas_probe_sata() -> ata_sas_async_probe().
790+
* hard reset in sas_probe_sata() -> ata_port_probe().
791791
* Note that in hisi_sas_debug_I_T_nexus_reset() we take care
792792
* to issue a hard reset by checking the dev status (== INIT).
793793
* b. When resetting the controller, this is simply unnecessary.

drivers/scsi/libsas/sas_ata.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ void sas_probe_sata(struct asd_sas_port *port)
653653
if (!dev_is_sata(dev))
654654
continue;
655655

656-
ata_sas_async_probe(dev->sata_dev.ap);
656+
ata_port_probe(dev->sata_dev.ap);
657657
}
658658
mutex_unlock(&port->ha->disco_mutex);
659659

include/linux/libata.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ extern int sata_link_scr_lpm(struct ata_link *link, enum ata_lpm_policy policy,
12401240
extern int ata_slave_link_init(struct ata_port *ap);
12411241
extern struct ata_port *ata_sas_port_alloc(struct ata_host *,
12421242
struct ata_port_info *, struct Scsi_Host *);
1243-
extern void ata_sas_async_probe(struct ata_port *ap);
1243+
extern void ata_port_probe(struct ata_port *ap);
12441244
extern int ata_sas_port_init(struct ata_port *);
12451245
extern int ata_sas_tport_add(struct device *parent, struct ata_port *ap);
12461246
extern void ata_sas_tport_delete(struct ata_port *ap);

0 commit comments

Comments
 (0)