* [PATCH] scsi: aic94xx: remove self-assigned redundant code
@ 2025-08-19 2:28 liuqiangneo
0 siblings, 0 replies; 7+ messages in thread
From: liuqiangneo @ 2025-08-19 2:28 UTC (permalink / raw)
To: James.Bottomley, martin.petersen; +Cc: linux-scsi, linux-kernel, liuqiang
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] scsi: aic94xx: remove self-assigned redundant code
@ 2025-08-19 2:29 liuqiangneo
0 siblings, 0 replies; 7+ messages in thread
From: liuqiangneo @ 2025-08-19 2:29 UTC (permalink / raw)
To: James.Bottomley, martin.petersen; +Cc: linux-scsi, linux-kernel, liuqiang
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] scsi: aic94xx: remove self-assigned redundant code
@ 2025-08-19 2:30 liuqiangneo
2025-08-20 3:08 ` Martin K. Petersen
2025-08-31 2:11 ` Martin K. Petersen
0 siblings, 2 replies; 7+ messages in thread
From: liuqiangneo @ 2025-08-19 2:30 UTC (permalink / raw)
To: James.Bottomley, martin.petersen; +Cc: linux-scsi, linux-kernel, Qiang Liu
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] scsi: aic94xx: remove self-assigned redundant code
2025-08-19 2:30 [PATCH] scsi: aic94xx: remove self-assigned redundant code liuqiangneo
@ 2025-08-20 3:08 ` Martin K. Petersen
2025-08-20 9:24 ` John Garry
2025-08-31 2:11 ` Martin K. Petersen
1 sibling, 1 reply; 7+ messages in thread
From: Martin K. Petersen @ 2025-08-20 3:08 UTC (permalink / raw)
To: liuqiangneo
Cc: James.Bottomley, martin.petersen, linux-scsi, linux-kernel,
Qiang Liu
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] scsi: aic94xx: remove self-assigned redundant code
2025-08-20 3:08 ` Martin K. Petersen
@ 2025-08-20 9:24 ` John Garry
2025-08-25 15:59 ` Martin K. Petersen
0 siblings, 1 reply; 7+ messages in thread
From: John Garry @ 2025-08-20 9:24 UTC (permalink / raw)
To: Martin K. Petersen, liuqiangneo
Cc: James.Bottomley, linux-scsi, linux-kernel, Qiang Liu
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] scsi: aic94xx: remove self-assigned redundant code
2025-08-20 9:24 ` John Garry
@ 2025-08-25 15:59 ` Martin K. Petersen
0 siblings, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2025-08-25 15:59 UTC (permalink / raw)
To: John Garry
Cc: Martin K. Petersen, liuqiangneo, James.Bottomley, linux-scsi,
linux-kernel, Qiang Liu
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] scsi: aic94xx: remove self-assigned redundant code
2025-08-19 2:30 [PATCH] scsi: aic94xx: remove self-assigned redundant code liuqiangneo
2025-08-20 3:08 ` Martin K. Petersen
@ 2025-08-31 2:11 ` Martin K. Petersen
1 sibling, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2025-08-31 2:11 UTC (permalink / raw)
To: James.Bottomley, liuqiangneo
Cc: Martin K . Petersen, linux-scsi, linux-kernel, Qiang Liu
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-08-31 2:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-19 2:30 [PATCH] scsi: aic94xx: remove self-assigned redundant code liuqiangneo
2025-08-20 3:08 ` Martin K. Petersen
2025-08-20 9:24 ` John Garry
2025-08-25 15:59 ` Martin K. Petersen
2025-08-31 2:11 ` Martin K. Petersen
-- strict thread matches above, loose matches on Subject: below --
2025-08-19 2:29 liuqiangneo
2025-08-19 2:28 liuqiangneo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).