From: Bjorn Helgaas <helgaas@kernel.org>
To: Yue Wang <yue.wang@Amlogic.com>
Cc: linux-pci@vger.kernel.org, Kevin Hilman <khilman@baylibre.com>,
linux-amlogic@lists.infradead.org
Subject: pci-meson covery issue #1442509
Date: Tue, 27 Oct 2020 11:40:33 -0500 [thread overview]
Message-ID: <20201027164033.GA184666@bjorn-Precision-5520> (raw)
Hi Yue,
Please take a look at this issue reported by Coverity:
340 static int meson_pcie_link_up(struct dw_pcie *pci)
341 {
342 struct meson_pcie *mp = to_meson_pcie(pci);
343 struct device *dev = pci->dev;
344 u32 speed_okay = 0;
345 u32 cnt = 0;
346 u32 state12, state17, smlh_up, ltssm_up, rdlh_up;
347
348 do {
349 state12 = meson_cfg_readl(mp, PCIE_CFG_STATUS12);
350 state17 = meson_cfg_readl(mp, PCIE_CFG_STATUS17);
351 smlh_up = IS_SMLH_LINK_UP(state12);
352 rdlh_up = IS_RDLH_LINK_UP(state12);
353 ltssm_up = IS_LTSSM_UP(state12);
354
CID 1442509 (#1 of 1): Operands don't affect result
(CONSTANT_EXPRESSION_RESULT) result_independent_of_operands: ((state17
>> 7) & 1) < PCIE_GEN3 is always true regardless of the values of its
operands. This occurs as the logical operand of if.
355 if (PM_CURRENT_STATE(state17) < PCIE_GEN3)
356 speed_okay = 1;
"PM" seems like a funny name for a link speed. It sounds more like
something related to power management, e.g., D0, D3.
next reply other threads:[~2020-10-27 16:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 16:40 Bjorn Helgaas [this message]
[not found] <2020102810175892085918@amlogic.com>
2020-10-28 12:06 ` pci-meson covery issue #1442509 Bjorn Helgaas
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=20201027164033.GA184666@bjorn-Precision-5520 \
--to=helgaas@kernel.org \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=yue.wang@Amlogic.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;
as well as URLs for NNTP newsgroup(s).