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.
2 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 1348151: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
/sys/dev/pci/ismt.c: 743 in ismt_attach()
________________________________________________________________________________________________________
*** CID 1348151: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
/sys/dev/pci/ismt.c: 743 in ismt_attach()
737 sc->dma_buffer_dma_map, sc->dma_buffer, DMA_BUFFER_SIZE,
738 NULL, 0);
739
740 bus_space_write_4(sc->mmio_tag, sc->mmio_handle, ISMT_MSTR_MDBA,
741 ISMT_LOW(sc->desc_dma_map->dm_segs[0].ds_addr));
742 bus_space_write_4(sc->mmio_tag, sc->mmio_handle, ISMT_MSTR_MDBA + 4,
>>> CID 1348151: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
>>> "(__uint64_t)sc->desc_dma_map->dm_segs[0].ds_addr >> 32" is 0 regardless of the values of its operands. This occurs as the bitwise first operand of '&'.
743 ISMT_HIGH(sc->desc_dma_map->dm_segs[0].ds_addr));
744
745 /* initialize the Master Control Register (MCTRL) */
746 bus_space_write_4(sc->mmio_tag, sc->mmio_handle, ISMT_MSTR_MCTRL,
747 ISMT_MCTRL_MEIE);
748
** CID 1348152: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
/sys/dev/pci/ismt.c: 371 in ismt_submit()
________________________________________________________________________________________________________
*** CID 1348152: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
/sys/dev/pci/ismt.c: 371 in ismt_submit()
365 desc->control |= ISMT_DESC_FAIR;
366 if ((flags & I2C_F_POLL) == 0)
367 desc->control |= ISMT_DESC_INT;
368
369 desc->tgtaddr_rw = ISMT_DESC_ADDR_RW(slave, is_read);
370 desc->dptr_low = ISMT_LOW(sc->dma_buffer_dma_map->dm_segs[0].ds_addr);
>>> CID 1348152: Integer handling issues (CONSTANT_EXPRESSION_RESULT)
>>> "(__uint64_t)sc->dma_buffer_dma_map->dm_segs[0].ds_addr >> 32" is 0 regardless of the values of its operands. This occurs as the bitwise first operand of '&'.
371 desc->dptr_high = ISMT_HIGH(sc->dma_buffer_dma_map->dm_segs[0].ds_addr);
372
373 bus_dmamap_sync(sc->desc_dma_tag, sc->desc_dma_map,
374 desc - &sc->desc[0], sizeof(struct ismt_desc),
375 BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
376
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/netbsd-i386-kernel?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