lkml.org 
[lkml]   [2022]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3] ata: libata-scsi: simplify __ata_scsi_queuecmd()
From
On 1/6/22 09:13, Wenchao Hao wrote:
> This is just a clean code. Since each branch of "if" state would check
> scmd->cmd_len, so move the check of scmd->cmd_len out of "if" state to
> simplify parameters check.
>
> After the check of scmd->cmd_len is out of "if" state, we can remove
> one redundant "if" state.
>
> Remove a redundant variable "rc" by hand.
>
> This patch do not change origin function logic.
>
> Signed-off-by: Wenchao Hao <haowenchao@huawei.com>

Applied to for-5.17 with some changes to the commit message to clarify
the changes.
Thanks.

--
Damien Le Moal
Western Digital Research

\
 
 \ /
  Last update: 2022-01-11 00:59    [W:0.035 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site