Files
linux/drivers/ata
Wenchao Hao e09583e83e ata: libata-scsi: simplify __ata_scsi_queuecmd()
[ Upstream commit 84eac327af ]

This patch cleans up the code of __ata_scsi_queuecmd(). Since each
branch of the "if" condition check that scmd->cmd_len is not zero, move
this check out of the "if" to simplify the conditions being checked in
the "else" branch.

While at it, avoid the if-else-if-else structure using if-else if
structure and remove the redundant rc local variable.

This patch does not change the function logic.

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Stable-dep-of: e20e81a24a ("ata: libata-core: do not issue non-internal commands once EH is pending")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-02 17:41:00 +01:00
..
2022-10-29 10:12:54 +02:00
2021-06-14 08:26:54 -06:00
2021-03-26 17:13:02 -06:00