[coreboot] New Defects reported by Coverity Scan for coreboot

scan-admin at coverity.com scan-admin at coverity.com
Fri May 26 14:18:50 CEST 2017


Hi,

Please find the latest report on new defect(s) introduced to coreboot found with Coverity Scan.

1 new defect(s) introduced to coreboot found with Coverity Scan.
1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1375671:    (NO_EFFECT)
/src/soc/samsung/exynos5420/spi.c: 213 in spi_ctrlr_setup()
/src/soc/qualcomm/ipq806x/spi.c: 767 in spi_ctrlr_setup()
/src/soc/qualcomm/ipq40xx/spi.c: 657 in spi_ctrlr_setup()


________________________________________________________________________________________________________
*** CID 1375671:    (NO_EFFECT)
/src/soc/samsung/exynos5420/spi.c: 213 in spi_ctrlr_setup()
207     	struct exynos_spi *regs = to_exynos_spi(slave)->regs;
208     	setbits_le32(&regs->cs_reg, SPI_SLAVE_SIG_INACT);
209     }
210     
211     static int spi_ctrlr_setup(const struct spi_slave *slave)
212     {
>>>     CID 1375671:    (NO_EFFECT)
>>>     This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "slave->bus >= 0U".
213     	ASSERT(slave->bus >= 0 && slave->bus < 3);
214     	struct exynos_spi_slave *eslave;
215     
216     	eslave = to_exynos_spi(slave);
217     	if (!eslave->initialized) {
218     		exynos_spi_init(eslave->regs);
/src/soc/qualcomm/ipq806x/spi.c: 767 in spi_ctrlr_setup()
761     
762     	/*
763     	 * IPQ GSBI (Generic Serial Bus Interface) supports SPI Flash
764     	 * on different GSBI5, GSBI6 and GSBI7
765     	 * with different number of chip selects (CS, channels):
766     	*/
>>>     CID 1375671:    (NO_EFFECT)
>>>     This less-than-zero comparison of an unsigned value is never true. "bus < 0U".
767     	if ((bus < GSBI5_SPI) || (bus > GSBI7_SPI)
768     		|| ((bus == GSBI5_SPI) && (cs > 3))
769     		|| ((bus == GSBI6_SPI) && (cs > 0))
770     		|| ((bus == GSBI7_SPI) && (cs > 0))) {
771     		printk(BIOS_ERR, "SPI error: unsupported bus %d "
772     			"(Supported busses 0,1 and 2) or chipselect\n", bus);
/src/soc/qualcomm/ipq40xx/spi.c: 657 in spi_ctrlr_setup()
651     {
652     	struct ipq_spi_slave *ds = NULL;
653     	int i;
654     	unsigned int bus = slave->bus;
655     	unsigned int cs = slave->cs;
656     
>>>     CID 1375671:    (NO_EFFECT)
>>>     This less-than-zero comparison of an unsigned value is never true. "bus < 0U".
657     	if ((bus < BLSP0_SPI) || (bus > BLSP1_SPI)
658     		|| ((bus == BLSP0_SPI) && (cs > 2))
659     		|| ((bus == BLSP1_SPI) && (cs > 0))) {
660     		printk(BIOS_ERR,
661     			"SPI error: unsupported bus %d (Supported busses 0, 1 and 2) "
662                             "or chipselect\n", bus);


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbLuoVetFLSjdonCi1EjfHRqWGQvojmmkYaBE-2BPJiTQvQ-3D-3D_q4bX76XMySz3BXBlWr5fXXJ4cvAsgEXEqC7dBPM7O5bD10FOc-2BjmWoG9tOuB0ga7LyPq26mnkAHPKLgW6t6xWLLjja31Nbwwj9RAkBEXhn-2B8XgSHSQnu4qONGw8MM0Ec0q8KmsUEOu2HVUR1nuD-2Fcmlx2RnDg3jVBbT8URm-2Bi9-2FEC5V8wzWiWkPG0X-2FvC1OSwBVqPsiUeE7Ff6WfLPQpswqOtDRBYiCfhr2vCtGPoxU-3D

To manage Coverity Scan email notifications for "coreboot at coreboot.org", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4e-2BpBzwOa5gzBZa9dWpDbzfofODnVj1enK2UkK0-2BgCCqyeem8IVKvTxSaOFkteZFcnohwvb2rnYNjswGryEWCURnUk6WHU42sbOmtOjD-2Bx5c-3D_q4bX76XMySz3BXBlWr5fXXJ4cvAsgEXEqC7dBPM7O5bD10FOc-2BjmWoG9tOuB0ga7jp4qGAlXc7MYEEQ9ZsWvocdkyDiDm7-2BJz3Lh-2BC-2BeP8vwvDOmTulZGSEMs6p9Kh77AtMWYkqy6Y527YjuBLKNkt54vD-2FKwQ7wqAczm2XwTLYbP8Tpm0jDVboHJR7Gini6t6h8it22Vje80OlWZih3ATMtfjPLJWV2OLXpiW7ijgk-3D




More information about the coreboot mailing list