[08/10] scsi: libsas: Delete sas_ata_task.set_affil_pol

Message ID 20230814141022.36875-9-john.g.garry@oracle.com
State New
Headers
Series libsas: Some tidy-up |

Commit Message

John Garry Aug. 14, 2023, 2:10 p.m. UTC
  Since libsas was introduced in commit 2908d778ab3e ("[SCSI] aic94xx: new
driver"), sas_ata_task.set_affil_pol is never set, so delete it and the
reference in asd_build_ata_ascb().

Signed-off-by: John Garry <john.g.garry@oracle.com>
---
 drivers/scsi/aic94xx/aic94xx_task.c | 7 +++----
 include/scsi/libsas.h               | 1 -
 2 files changed, 3 insertions(+), 5 deletions(-)
  

Comments

Damien Le Moal Aug. 15, 2023, 2:12 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_ata_task.set_affil_pol is never set, so delete it and the
> reference in asd_build_ata_ascb().
> 
> 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:37 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_ata_task.set_affil_pol is never set, so delete it and the
> reference in asd_build_ata_ascb().
> 
> Signed-off-by: John Garry<john.g.garry@oracle.com>
> ---
>   drivers/scsi/aic94xx/aic94xx_task.c | 7 +++----
>   include/scsi/libsas.h               | 1 -
>   2 files changed, 3 insertions(+), 5 deletions(-)

Reviewed-by: Jason Yan <yanaijie@huawei.com>
  
Hannes Reinecke Oct. 9, 2023, 6:56 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_ata_task.set_affil_pol is never set, so delete it and the
> reference in asd_build_ata_ascb().
> 
> Signed-off-by: John Garry <john.g.garry@oracle.com>
> ---
>   drivers/scsi/aic94xx/aic94xx_task.c | 7 +++----
>   include/scsi/libsas.h               | 1 -
>   2 files changed, 3 insertions(+), 5 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
  

Patch

diff --git a/drivers/scsi/aic94xx/aic94xx_task.c b/drivers/scsi/aic94xx/aic94xx_task.c
index f67983e8b262..ca435811c310 100644
--- a/drivers/scsi/aic94xx/aic94xx_task.c
+++ b/drivers/scsi/aic94xx/aic94xx_task.c
@@ -390,11 +390,10 @@  static int asd_build_ata_ascb(struct asd_ascb *ascb, struct sas_task *task,
 
 		scb->ata_task.retry_count = task->ata_task.retry_count;
 
-		flags = 0;
-		if (task->ata_task.set_affil_pol)
-			flags |= SET_AFFIL_POLICY;
 		if (task->ata_task.stp_affil_pol)
-			flags |= STP_AFFIL_POLICY;
+			flags = STP_AFFIL_POLICY;
+		else
+			flags = 0;
 		scb->ata_task.flags = flags;
 	}
 	ascb->tasklet_complete = asd_task_tasklet_complete;
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 5b2e6932c564..3a52094090a1 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -529,7 +529,6 @@  struct sas_ata_task {
 
 	u8     dma_xfer:1;	  /* PIO:0 or DMA:1 */
 	u8     use_ncq:1;
-	u8     set_affil_pol:1;
 	u8     stp_affil_pol:1;
 
 	u8     device_control_reg_update:1;