scsi: qla2xxx: Use a variable for repeated mem_size computation
authorDeepak R Varma <drv@mailo.com>
Sun, 8 Jan 2023 20:38:24 +0000 (02:08 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 24 Jan 2023 02:15:02 +0000 (21:15 -0500)
commit4fd62973739de61cf4c83b960db7d1824bd854a3
tree416bc8985d5f886537cb674f9713cd4420e6abc1
parent2aa0f83edb1c5a341f0aca209b0ecd74672fb3fa
scsi: qla2xxx: Use a variable for repeated mem_size computation

Use a variable to compute memory size to be allocated once instead of
repeatedly computing it at different locations in the function. Issue
identified using the array_size_dup Coccinelle semantic patch.

Link: https://lore.kernel.org/r/Y7spwF8HTt0c0l7y@ubun2204.myguest.virtualbox.org
Signed-off-by: Deepak R Varma <drv@mailo.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/tcm_qla2xxx.c