diff mbox series

[05/10] scsi: libsas: Delete sas_ssp_task.retry_count

Message ID 20230814141022.36875-6-john.g.garry@oracle.com (mailing list archive)
State Superseded
Headers show
Series libsas: Some tidy-up | expand

Commit Message

John Garry Aug. 14, 2023, 2:10 p.m. UTC
Since libsas was introduced in commit 2908d778ab3e ("[SCSI] aic94xx: new
driver"), sas_ssp_task.retry_count is only ever set, so delete it.

The aic94xx driver also had its own retry_count definition in struct scb
sub-structs, which may have caused a mix-up.

Signed-off-by: John Garry <john.g.garry@oracle.com>
---
 drivers/scsi/libsas/sas_ata.c       | 1 -
 drivers/scsi/libsas/sas_scsi_host.c | 1 -
 include/scsi/libsas.h               | 2 --
 3 files changed, 4 deletions(-)

Comments

Damien Le Moal Aug. 15, 2023, 2:10 a.m. UTC | #1
On 8/14/23 23:10, John Garry wrote:
> Since libsas was introduced in commit 2908d778ab3e ("[SCSI] aic94xx: new
> driver"), sas_ssp_task.retry_count is only ever set, so delete it.
> 
> The aic94xx driver also had its own retry_count definition in struct scb
> sub-structs, which may have caused a mix-up.
> 
> Signed-off-by: John Garry <john.g.garry@oracle.com>

Looks good.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Jason Yan Aug. 15, 2023, 9:31 a.m. UTC | #2
On 2023/8/14 22:10, John Garry wrote:
> Since libsas was introduced in commit 2908d778ab3e ("[SCSI] aic94xx: new
> driver"), sas_ssp_task.retry_count is only ever set, so delete it.
> 
> The aic94xx driver also had its own retry_count definition in struct scb
> sub-structs, which may have caused a mix-up.
> 
> Signed-off-by: John Garry<john.g.garry@oracle.com>
> ---
>   drivers/scsi/libsas/sas_ata.c       | 1 -
>   drivers/scsi/libsas/sas_scsi_host.c | 1 -
>   include/scsi/libsas.h               | 2 --
>   3 files changed, 4 deletions(-)

Reviewed-by: Jason Yan <yanaijie@huawei.com>
Hannes Reinecke Oct. 9, 2023, 6:41 a.m. UTC | #3
On 8/14/23 16:10, John Garry wrote:
> Since libsas was introduced in commit 2908d778ab3e ("[SCSI] aic94xx: new
> driver"), sas_ssp_task.retry_count is only ever set, so delete it.
> 
> The aic94xx driver also had its own retry_count definition in struct scb
> sub-structs, which may have caused a mix-up.
> 
> Signed-off-by: John Garry <john.g.garry@oracle.com>
> ---
>   drivers/scsi/libsas/sas_ata.c       | 1 -
>   drivers/scsi/libsas/sas_scsi_host.c | 1 -
>   include/scsi/libsas.h               | 2 --
>   3 files changed, 4 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
diff mbox series

Patch

diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index 2d29154ca8ef..ed9af2b401ef 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -201,7 +201,6 @@  static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc)
 		task->data_dir = qc->dma_dir;
 	}
 	task->scatter = qc->sg;
-	task->ata_task.retry_count = 1;
 	qc->lldd_task = task;
 
 	task->ata_task.use_ncq = ata_is_ncq(qc->tf.protocol);
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index 86b5d6b87282..0c103f4523b8 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -142,7 +142,6 @@  static struct sas_task *sas_create_task(struct scsi_cmnd *cmd,
 	task->dev = dev;
 	task->task_proto = task->dev->tproto; /* BUG_ON(!SSP) */
 
-	task->ssp_task.retry_count = 1;
 	int_to_scsilun(cmd->device->lun, &lun);
 	memcpy(task->ssp_task.LUN, &lun.scsi_lun, 8);
 	task->ssp_task.task_attr = TASK_ATTR_SIMPLE;
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index d42bfdff7812..d8222c442640 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -563,8 +563,6 @@  enum task_attribute {
 };
 
 struct sas_ssp_task {
-	u8     retry_count;	  /* hardware retry, should be > 0 */
-
 	u8     LUN[8];
 	u8     enable_first_burst:1;
 	enum   task_attribute task_attr;