From: Subhash Jadavani <subhashj@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: venkatg@codeaurora.org, linux-scsi@vger.kernel.org,
linux-scsi-owner@vger.kernel.org
Subject: Re: [bug report] scsi: ufs-qcom: dump additional testbus registers
Date: Thu, 16 Feb 2017 10:08:47 -0800 [thread overview]
Message-ID: <af7910bc1169286ecaa8638136bb6628@codeaurora.org> (raw)
In-Reply-To: <20170214075859.GA2550@mwanda>
On 2017-02-13 23:58, Dan Carpenter wrote:
> Hello Venkat Gopalakrishnan,
>
> The patch 9c46b8676271: "scsi: ufs-qcom: dump additional testbus
> registers" from Feb 3, 2017, leads to the following static checker
> warning:
>
> drivers/scsi/ufs/ufs-qcom.c:1531 ufs_qcom_testbus_cfg_is_ok()
> warn: impossible condition '(host->testbus.select_minor > 255) =>
> (0-255 > 255)'
>
> drivers/scsi/ufs/ufs-qcom.c
> 1517 static bool ufs_qcom_testbus_cfg_is_ok(struct ufs_qcom_host
> *host)
> 1518 {
> 1519 if (host->testbus.select_major >= TSTBUS_MAX) {
> 1520 dev_err(host->hba->dev,
> 1521 "%s: UFS_CFG1[TEST_BUS_SEL} may not
> equal 0x%05X\n",
> 1522 __func__, host->testbus.select_major);
> 1523 return false;
> 1524 }
> 1525
> 1526 /*
> 1527 * Not performing check for each individual
> select_major
> 1528 * mappings of select_minor, since there is no harm in
> 1529 * configuring a non-existent select_minor
> 1530 */
> 1531 if (host->testbus.select_minor > 0xFF) {
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> It might make sense to keep this check. I don't know. But it's
> confusing that 0xFF is a magic number. Better to make it a define.
Yes, i agree, this check is redundant. I will post a fix to remove this.
>
> 1532 dev_err(host->hba->dev,
> 1533 "%s: 0x%05X is not a legal testbus
> option\n",
> 1534 __func__, host->testbus.select_minor);
> 1535 return false;
> 1536 }
> 1537
> 1538 return true;
> 1539 }
>
> regards,
> dan carpenter
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
prev parent reply other threads:[~2017-02-16 18:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-14 7:58 [bug report] scsi: ufs-qcom: dump additional testbus registers Dan Carpenter
2017-02-16 18:08 ` Subhash Jadavani [this message]
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=af7910bc1169286ecaa8638136bb6628@codeaurora.org \
--to=subhashj@codeaurora.org \
--cc=dan.carpenter@oracle.com \
--cc=linux-scsi-owner@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=venkatg@codeaurora.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.