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.
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 2 of 2 defect(s)


** CID 1362439:  Control flow issues  (DEADCODE)
/sys/dev/ic/nvme.c: 360 in nvme_attach()


________________________________________________________________________________________________________
*** CID 1362439:  Control flow issues  (DEADCODE)
/sys/dev/ic/nvme.c: 360 in nvme_attach()
354     		aprint_error_dev(sc->sc_dev, "NVMe minimum page size %u "
355     		    "is greater than CPU page size %u\n",
356     		    1 << NVME_CAP_MPSMIN(cap), 1 << PAGE_SHIFT);
357     		return 1;
358     	}
359     	if (NVME_CAP_MPSMAX(cap) < mps)
>>>     CID 1362439:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "mps = 12ULL + ((cap >> 52) ...".
360     		mps = NVME_CAP_MPSMAX(cap);
361     
362     	/* set initial values to be used for admin queue during probe */
363     	sc->sc_rdy_to = NVME_CAP_TO(cap);
364     	sc->sc_mps = 1 << mps;
365     	sc->sc_mdts = MAXPHYS;

** CID 1373272:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/sys/dev/usb/if_run.c: 2502 in run_tx()


________________________________________________________________________________________________________
*** CID 1373272:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/sys/dev/usb/if_run.c: 2502 in run_tx()
2496     	if (rt2860_rates[ridx].phy == IEEE80211_T_DS) {
2497     		txwi->phy = htole16(RT2860_PHY_CCK);
2498     		if (ridx != RT2860_RIDX_CCK1 &&
2499     		    (ic->ic_flags & IEEE80211_F_SHPREAMBLE))
2500     			mcs |= RT2860_PHY_SHPRE;
2501     	} else
>>>     CID 1373272:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
>>>     In "mcs |= 16384U /* 1U << 14 */", wider "16384U /* 1U << 14 */" has high-order bits (0x4000) that don't affect the narrower left-hand side.
2502     		mcs |= RT2860_PHY_OFDM;
2503     	txwi->phy |= htole16(mcs);
2504     
2505     	txwi->txop = RT2860_TX_TXOP_BACKOFF;
2506     
2507     	if (!IEEE80211_IS_MULTICAST(wh->i_addr1) &&


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRb2JZfDAOAZcqzsy8LMBKBjEGdxS-2FDDouPkeZ4HbDca3C30UoLW748TLKQM-2BXRpGRc-3D_XWm3CUIFU8ffmjzuNhQ8cIHoQgXzXkm61Fmjr59D05VfdRu09MlUrUB7eXx9UuL9UjC-2FLGm2PgMLNR7jG97GN6GrvpTN9C-2FIf-2FtVxczoq6ltNZa-2BZIwWUdYzYHEDQ5KqNDNBtR3T9q1ZR5MKYXZGqa3uD07cWCKgg84WnW2jrGxsKb4nNR0C4sarTEkgPq4CCN2Stwro8jaaOV7mSCyd74iEpMTWHnh2Pt1jinqO9fA-3D

To manage Coverity Scan email notifications for "coverity-updates%netbsd.org@localhost", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4m7U7Yoel-2F6MYPxol7ToiLwYIjoNbVQOCAwEeTNJofEDwTlN0JRhKMyijhpnAObR-2FlLVG-2Fr3EBKWgiICNdX1HPA6Ws0-2F1wHBf2tG9AnMDB8g-3D_XWm3CUIFU8ffmjzuNhQ8cIHoQgXzXkm61Fmjr59D05VfdRu09MlUrUB7eXx9UuL9UjC-2FLGm2PgMLNR7jG97GNw6VYOjMCcJ-2FUOOkNTGbk-2FIFk1ylW83rOuixIzd2dDhslGRgSXhtfHd0v0GkMhie54ylTCiwwWxp-2BqJq7MfXwUOImOk21-2FgicJmkuZlV6M6wK-2FP-2BLnOOrnhcfAUIjX2GdLBVz50wvAhMvEKIsykfyDI-3D



Home | Main Index | Thread Index | Old Index