mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-20 19:23:40 +00:00
ata: libata-scsi: simplify __ata_scsi_queuecmd()
[ Upstream commit84eac327af] 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>
This commit is contained in:
parent
a9059e338f
commit
e09583e83e
1 changed files with 21 additions and 24 deletions
Loading…
Add table
Add a link
Reference in a new issue