drivers/scsi/aic94xx/aic94xx_task.c | 1 - 1 file changed, 1 deletion(-)
From: Qiang Liu <liuqiang@kylinos.cn>
Assigning ssp_task.retry_count to itself has no effect
Signed-off-by: Qiang Liu <liuqiang@kylinos.cn>
---
drivers/scsi/aic94xx/aic94xx_task.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/aic94xx/aic94xx_task.c b/drivers/scsi/aic94xx/aic94xx_task.c
index 4bfd03724ad6..b26a468ddc98 100644
--- a/drivers/scsi/aic94xx/aic94xx_task.c
+++ b/drivers/scsi/aic94xx/aic94xx_task.c
@@ -488,7 +488,6 @@ static int asd_build_ssp_ascb(struct asd_ascb *ascb, struct sas_task *task,
scb->ssp_task.conn_handle = cpu_to_le16(
(u16)(unsigned long)dev->lldd_dev);
scb->ssp_task.data_dir = data_dir_flags[task->data_dir];
- scb->ssp_task.retry_count = scb->ssp_task.retry_count;
ascb->tasklet_complete = asd_task_tasklet_complete;
--
2.43.0
On Tue, 19 Aug 2025 10:30:06 +0800, liuqiangneo@163.com wrote: > Assigning ssp_task.retry_count to itself has no effect > > Applied to 6.18/scsi-queue, thanks! [1/1] scsi: aic94xx: remove self-assigned redundant code https://git.kernel.org/mkp/scsi/c/00f4699872d0 -- Martin K. Petersen
> Assigning ssp_task.retry_count to itself has no effect > scb->ssp_task.data_dir = data_dir_flags[task->data_dir]; > - scb->ssp_task.retry_count = scb->ssp_task.retry_count; This begs the question of what the original author intended to write. -- Martin K. Petersen
On 20/08/2025 04:08, Martin K. Petersen wrote: > >> Assigning ssp_task.retry_count to itself has no effect > >> scb->ssp_task.data_dir = data_dir_flags[task->data_dir]; >> - scb->ssp_task.retry_count = scb->ssp_task.retry_count; > > This begs the question of what the original author intended to write. > If you check commit 86344494e364, I got rid off sas_task.retry_count as it was never used. This means that we explicitly set scb->ata_task.retry_count to zero now. I guess that they wanted to something like that for scb->ssp_task, but there was no sas_task member to copy from. The value in scb->ssp_task.retry_count would be zero from asd_ascb_alloc() -> asd_init_ascb(). So dropping this self-assigned code should be ok. However, it would be nice to have consistent code for all protocol frame types, so we could get rid of setting scb->ata_task.retry_count = 0 also.
John, >>> Assigning ssp_task.retry_count to itself has no effect >> >>> scb->ssp_task.data_dir = data_dir_flags[task->data_dir]; >>> - scb->ssp_task.retry_count = scb->ssp_task.retry_count; >> This begs the question of what the original author intended to >> write. [...] Applied to 6.18/scsi-staging, thanks! -- Martin K. Petersen
© 2016 - 2025 Red Hat, Inc.