diff mbox series

[v2,2/8] ata,scsi: remove ata_sas_port_{start,stop} callbacks

Message ID 20230720004257.307031-3-nks@flawful.org
State Superseded
Headers show
Series libata: remove references to 'old' error handler | expand

Commit Message

Niklas Cassel July 20, 2023, 12:42 a.m. UTC
From: Hannes Reinecke <hare@suse.de>

Callbacks are empty now, so remove them.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
---
 drivers/ata/libata-sata.c     | 34 ----------------------------------
 drivers/scsi/libsas/sas_ata.c |  2 --
 include/linux/libata.h        |  2 --
 3 files changed, 38 deletions(-)

Comments

Jason Yan July 20, 2023, 1:45 a.m. UTC | #1
On 2023/7/20 8:42, Niklas Cassel wrote:
> From: Hannes Reinecke <hare@suse.de>
> 
> Callbacks are empty now, so remove them.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
> ---
>   drivers/ata/libata-sata.c     | 34 ----------------------------------
>   drivers/scsi/libsas/sas_ata.c |  2 --
>   include/linux/libata.h        |  2 --
>   3 files changed, 38 deletions(-)
> 
> diff --git a/drivers/ata/libata-sata.c b/drivers/ata/libata-sata.c
> index 99d4ab04bcce..d3b595294eee 100644
> --- a/drivers/ata/libata-sata.c
> +++ b/drivers/ata/libata-sata.c
> @@ -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
> diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
> index 77714a495cbb..7ead1f1be97f 100644
> --- a/drivers/scsi/libsas/sas_ata.c
> +++ b/drivers/scsi/libsas/sas_ata.c
> @@ -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,


Hi Niklas,

->port_start is NULL now but ata_sas_port_init() is still using it 
without checking whether it is NULL. I know the patch #3 will remove it 
finally. But this will bring a great inconvenience because the kernel 
will crash when bisectting to this commit.

Either put patch #3 before this patch or fold patch #3 directly into 
path #2 ?

Thanks,
Jason
diff mbox series

Patch

diff --git a/drivers/ata/libata-sata.c b/drivers/ata/libata-sata.c
index 99d4ab04bcce..d3b595294eee 100644
--- a/drivers/ata/libata-sata.c
+++ b/drivers/ata/libata-sata.c
@@ -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
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index 77714a495cbb..7ead1f1be97f 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -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,
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 820f7a3a2749..9424c490ef0b 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -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,