Re: [PATCH] scsi: aic94xx: remove self-assigned redundant code
From: John Garry
Date: Wed Aug 20 2025 - 05:34:44 EST
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.