ata: libata-scsi: simplify __ata_scsi_queuecmd()
stable inclusion from stable-v5.10.157 commit 4034d06a4dbecab7030a88b735a131357b2dac58 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7MU59 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4034d06a4dbecab7030a88b735a131357b2dac58 -------------------------------- [ Upstream commit 84eac327 ] 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: e20e81a2 ("ata: libata-core: do not issue non-internal commands once EH is pending") Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment