]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ata,scsi: remove ata_sas_port_{start,stop} callbacks
authorHannes Reinecke <hare@suse.de>
Mon, 31 Jul 2023 14:34:13 +0000 (16:34 +0200)
committerDamien Le Moal <dlemoal@kernel.org>
Wed, 2 Aug 2023 08:45:13 +0000 (17:45 +0900)
Callbacks are empty now, so remove them.

Also, remove the call to ap->ops->port_start() in ata_sas_port_init(),
as this would otherwise cause a NULL pointer dereference, now when the
callback is gone.

Signed-off-by: Hannes Reinecke <hare@suse.de>
[niklas: remove the call to ap->ops->port_start() in ata_sas_port_init()]
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>
drivers/ata/libata-sata.c
drivers/scsi/libsas/sas_ata.c
include/linux/libata.h

index cf401a54c9e16c09f8d58444d2d8890c06b72500..ce392b5b5930f987fa62987297c8079ed392e21c 100644 (file)
@@ -1144,40 +1144,6 @@ struct ata_port *ata_sas_port_alloc(struct ata_host *host,
 }
 EXPORT_SYMBOL_GPL(ata_sas_port_alloc);
 
-/**
- *     ata_sas_port_start - Set port up for dma.
- *     @ap: Port to initialize
- *
- *     Called just after data structures for each port are
- *     initialized.
- *
- *     May be used as the port_start() entry in ata_port_operations.
- *
- *     LOCKING:
- *     Inherited from caller.
- */
-int ata_sas_port_start(struct ata_port *ap)
-{
-       /* the port is marked as frozen at allocation time */
-       return 0;
-}
-EXPORT_SYMBOL_GPL(ata_sas_port_start);
-
-/**
- *     ata_sas_port_stop - Undo ata_sas_port_start()
- *     @ap: Port to shut down
- *
- *     May be used as the port_stop() entry in ata_port_operations.
- *
- *     LOCKING:
- *     Inherited from caller.
- */
-
-void ata_sas_port_stop(struct ata_port *ap)
-{
-}
-EXPORT_SYMBOL_GPL(ata_sas_port_stop);
-
 /**
  * ata_sas_async_probe - simply schedule probing and return
  * @ap: Port to probe
@@ -1211,10 +1177,6 @@ EXPORT_SYMBOL_GPL(ata_sas_sync_probe);
 
 int ata_sas_port_init(struct ata_port *ap)
 {
-       int rc = ap->ops->port_start(ap);
-
-       if (rc)
-               return rc;
        ap->print_id = atomic_inc_return(&ata_print_id);
        return 0;
 }
index 77714a495cbbae2c18068befaa157ff6bb2eb9fa..7ead1f1be97fbe6c7ea268b9262dadb73e628835 100644 (file)
@@ -565,8 +565,6 @@ static struct ata_port_operations sas_sata_ops = {
        .qc_prep                = ata_noop_qc_prep,
        .qc_issue               = sas_ata_qc_issue,
        .qc_fill_rtf            = sas_ata_qc_fill_rtf,
-       .port_start             = ata_sas_port_start,
-       .port_stop              = ata_sas_port_stop,
        .set_dmamode            = sas_ata_set_dmamode,
        .sched_eh               = sas_ata_sched_eh,
        .end_eh                 = sas_ata_end_eh,
index d61e5465076e9fe1fb3b6de9912962ea93308928..f8f8b558a8be29dd9b2138f028494f89ae2f4b0d 100644 (file)
@@ -1244,10 +1244,8 @@ extern struct ata_port *ata_sas_port_alloc(struct ata_host *,
 extern void ata_sas_async_probe(struct ata_port *ap);
 extern int ata_sas_sync_probe(struct ata_port *ap);
 extern int ata_sas_port_init(struct ata_port *);
-extern int ata_sas_port_start(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 void ata_sas_port_stop(struct ata_port *ap);
 extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *);
 extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap);
 extern void ata_tf_to_fis(const struct ata_taskfile *tf,