From: "Peter Wang (王信友)" <peter.wang@mediatek.com>
To: "bvanassche@acm.org" <bvanassche@acm.org>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"James.Bottomley@HansenPartnership.com"
<James.Bottomley@HansenPartnership.com>,
"avri.altman@wdc.com" <avri.altman@wdc.com>,
"ahalaney@redhat.com" <ahalaney@redhat.com>,
"quic_nguyenb@quicinc.com" <quic_nguyenb@quicinc.com>,
"manivannan.sadhasivam@linaro.org"
<manivannan.sadhasivam@linaro.org>,
"beanhuo@micron.com" <beanhuo@micron.com>
Subject: Re: [PATCH v4 3/4] scsi: ufs: core: Make ufshcd_uic_cmd_compl() easier to analyze
Date: Fri, 13 Sep 2024 07:06:47 +0000 [thread overview]
Message-ID: <73d686250c6463c22e9899c72b959ad2bfe0d8eb.camel@mediatek.com> (raw)
In-Reply-To: <20240912223019.3510966-4-bvanassche@acm.org>
On Thu, 2024-09-12 at 15:30 -0700, Bart Van Assche wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> In ufshcd_uic_cmd_compl(), there is code that dereferences 'cmd'
> with
> and without checking the 'cmd' pointer. This confuses static source
> code
> analyzers like Coverity and sparse. Since none of the code in
> ufshcd_uic_cmd_compl() can do anything useful if 'cmd' is NULL, move
> the
> 'cmd' test near the start of this function.
>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>
>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
next prev parent reply other threads:[~2024-09-13 7:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 22:30 [PATCH v4 0/4] Clean up the UFS driver UIC code Bart Van Assche
2024-09-12 22:30 ` [PATCH v4 1/4] scsi: ufs: core: Improve the struct ufs_hba documentation Bart Van Assche
2024-09-13 7:08 ` Bao D. Nguyen
2024-09-12 22:30 ` [PATCH v4 2/4] scsi: ufs: core: Make ufshcd_uic_cmd_compl() easier to read Bart Van Assche
2024-09-13 7:09 ` Bao D. Nguyen
2024-09-12 22:30 ` [PATCH v4 3/4] scsi: ufs: core: Make ufshcd_uic_cmd_compl() easier to analyze Bart Van Assche
2024-09-13 7:06 ` Peter Wang (王信友) [this message]
2024-09-13 7:31 ` Bao D. Nguyen
2024-09-13 17:55 ` Bart Van Assche
2024-09-12 22:30 ` [PATCH v4 4/4] scsi: ufs: core: Always initialize the UIC done completion Bart Van Assche
2024-10-04 1:36 ` [PATCH v4 0/4] Clean up the UFS driver UIC code Martin K. Petersen
2024-10-16 2:40 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=73d686250c6463c22e9899c72b959ad2bfe0d8eb.camel@mediatek.com \
--to=peter.wang@mediatek.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=ahalaney@redhat.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=linux-scsi@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=martin.petersen@oracle.com \
--cc=quic_nguyenb@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox