pcie-mediatek.c coverity issue #1437218

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ryder,

Please take a look at this issue reported by Coverity:

 760 static int mtk_pcie_startup_port(struct mtk_pcie_port *port)
 761 {
 762        struct mtk_pcie *pcie = port->pcie;

CID 1437218 (#1 of 1): Wrong operator used
(CONSTANT_EXPRESSION_RESULT) operator_confusion: (port->slot << 3) & 7
is always 0 regardless of the values of its operands. This occurs as
an initializer.

    	Did you intend to use right-shift (>>) in port->slot << 3?

 763        u32 func = PCI_FUNC(port->slot << 3);
 764        u32 slot = PCI_SLOT(port->slot << 3);



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux