summaryrefslogtreecommitdiffstats
path: root/arch/x86/net
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-02-20 12:18:07 +0900
committerMartin K. Petersen <martin.petersen@oracle.com>2022-02-22 21:31:21 -0500
commite29c47fe8946cc732b0e0d393b65b13c84bb69d0 (patch)
tree0f7ee0fc01b7151bb2c245cee943e125a78b59b0 /arch/x86/net
parentf91767a35f0951ac30a6607497b3b9aa2b79d74e (diff)
downloadlinux-e29c47fe8946cc732b0e0d393b65b13c84bb69d0.tar.bz2
scsi: pm8001: Simplify pm8001_task_exec()
The main part of the pm8001_task_exec() function uses a do {} while(0) loop that is useless and only makes the code harder to read. Remove this loop. The unnecessary local variable t is also removed. Additionally, avoid repeatedly declaring "struct task_status_struct *ts" to handle error cases by declaring this variable for the entire function scope. This allows simplifying the error cases, and together with the addition of blank lines make the code more readable. Finally, handling of the running_req counter is fixed to avoid decrementing it without a corresponding incrementation in the case of an invalid task protocol. Link: https://lore.kernel.org/r/20220220031810.738362-29-damien.lemoal@opensource.wdc.com Reviewed-by: John Garry <john.garry@huawei.com> Reviewed-by: Jack Wang <jinpu.wang@ionos.com> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'arch/x86/net')
0 files changed, 0 insertions, 0 deletions