Coverity-updates archive

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

New Defects reported by Coverity Scan for NetBSD-i386-kernel



Hi,

Please find the latest report on new defect(s) introduced to NetBSD-i386-kernel found with Coverity Scan.

2 new defect(s) introduced to NetBSD-i386-kernel found with Coverity Scan.


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


** CID 1314701:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/sys/dev/sdmmc/sdhc.c: 1404 in sdhc_start_command()


________________________________________________________________________________________________________
*** CID 1314701:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/sys/dev/sdmmc/sdhc.c: 1404 in sdhc_start_command()
1398     		HSET1(hp, SDHC_HOST_CTL, SDHC_DMA_SELECT_ADMA2);
1399     
1400     		const paddr_t desc_addr = hp->adma_map->dm_segs[0].ds_addr;
1401     
1402     		HWRITE4(hp, SDHC_ADMA_SYSTEM_ADDR, desc_addr & 0xffffffff);
1403     		if (ISSET(hp->flags, SHF_USE_ADMA2_64)) {
>>>     CID 1314701:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
>>>     "(__uint64_t)desc_addr >> 32" is 0 regardless of the values of its operands. This occurs as an argument to a function call.
1404     			HWRITE4(hp, SDHC_ADMA_SYSTEM_ADDR + 4,
1405     			    (uint64_t)desc_addr >> 32);
1406     		}
1407     	} else if (ISSET(mode, SDHC_DMA_ENABLE) &&
1408     	    !ISSET(sc->sc_flags, SDHC_FLAG_EXTERNAL_DMA)) {
1409     		HWRITE4(hp, SDHC_DMA_ADDR, cmd->c_dmamap->dm_segs[0].ds_addr);

** CID 1314702:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/sys/dev/sdmmc/sdhc.c: 1384 in sdhc_start_command()


________________________________________________________________________________________________________
*** CID 1314702:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/sys/dev/sdmmc/sdhc.c: 1384 in sdhc_start_command()
1378     			} else {
1379     				struct sdhc_adma2_descriptor64 *desc =
1380     				    hp->adma2;
1381     				desc[seg].attribute = htole16(attr);
1382     				desc[seg].length = htole16(len);
1383     				desc[seg].address = htole32(paddr & 0xffffffff);
>>>     CID 1314702:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
>>>     "(__uint64_t)paddr >> 32" is 0 regardless of the values of its operands. This occurs as the operand of assignment.
1384     				desc[seg].address_hi = htole32(
1385     				    (uint64_t)paddr >> 32);
1386     			}
1387     		}
1388     		if (ISSET(hp->flags, SHF_USE_ADMA2_32)) {
1389     			struct sdhc_adma2_descriptor32 *desc = hp->adma2;


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/1450?tab=overview

To manage Coverity Scan email notifications for "coverity-updates%netbsd.org@localhost", click https://scan.coverity.com/subscriptions/edit?email=coverity-updates%40netbsd.org&token=487286ca1a9a4f4bd485d16f66b5e782



Home | Main Index | Thread Index | Old Index