linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pcie-rockchip-ep.c coverity issue #1437163
@ 2020-10-27 16:16 Bjorn Helgaas
  2020-10-27 16:37 ` Bjorn Helgaas
  0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2020-10-27 16:16 UTC (permalink / raw)
  To: Shawn Lin; +Cc: linux-pci

Hi Shawn,

Please take a look at this issue reported by Coverity:

332 static int rockchip_pcie_ep_get_msi(struct pci_epc *epc, u8 fn)
333 {
334        struct rockchip_pcie_ep *ep = epc_get_drvdata(epc);
335        struct rockchip_pcie *rockchip = &ep->rockchip;
336        u16 flags;
337
338        flags = rockchip_pcie_read(rockchip,
339                                   ROCKCHIP_PCIE_EP_FUNC_BASE(fn) +
340                                   ROCKCHIP_PCIE_EP_MSI_CTRL_REG);

CID 1437163 (#2 of 2): Operands don't affect result
(CONSTANT_EXPRESSION_RESULT) result_independent_of_operands: flags &
(65536UL /* 1UL << 16 */) is always 0 regardless of the values of its
operands. This occurs as the logical operand of !.

341        if (!(flags & ROCKCHIP_PCIE_EP_MSI_CTRL_ME))
342                return -EINVAL;

^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <60a290a9-678b-b08d-25b4-8299f2f2c916@rock-chips.com>]

end of thread, other threads:[~2020-12-24  1:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-27 16:16 pcie-rockchip-ep.c coverity issue #1437163 Bjorn Helgaas
2020-10-27 16:37 ` Bjorn Helgaas
     [not found] <60a290a9-678b-b08d-25b4-8299f2f2c916@rock-chips.com>
2020-12-23 21:04 ` Bjorn Helgaas
2020-12-24  0:55   ` Shawn Lin

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).