diff options
| author | Andy Fiddaman <omnios@citrus-it.co.uk> | 2022-07-25 20:54:21 +0000 |
|---|---|---|
| committer | Andy Fiddaman <omnios@citrus-it.co.uk> | 2022-07-26 14:55:29 +0000 |
| commit | ce17336ed725d3b7fdff67bf0a0ee2b55018fec6 (patch) | |
| tree | c0ce3edf86bd30c812879916c192b1866fd61e5a /usr/src/uts/common/io | |
| parent | fe441c7591b77f09d92eddfd633b49b4ccc92027 (diff) | |
| download | illumos-gate-ce17336ed725d3b7fdff67bf0a0ee2b55018fec6.tar.gz | |
14852 Enable smatch 'sizeof' checks in the kernel
Reviewed by: Jason King <jason.brian.king+illumos@gmail.com>
Reviewed by: Dan McDonald <danmcd@mnx.io>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Diffstat (limited to 'usr/src/uts/common/io')
| -rw-r--r-- | usr/src/uts/common/io/bridge.c | 2 | ||||
| -rw-r--r-- | usr/src/uts/common/io/fibre-channel/fca/oce/oce_gld.c | 2 | ||||
| -rw-r--r-- | usr/src/uts/common/io/fibre-channel/fca/qlge/qlge.c | 2 | ||||
| -rw-r--r-- | usr/src/uts/common/io/nxge/nxge_main.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/usr/src/uts/common/io/bridge.c b/usr/src/uts/common/io/bridge.c index 389948e295..1f7d3fa680 100644 --- a/usr/src/uts/common/io/bridge.c +++ b/usr/src/uts/common/io/bridge.c @@ -504,7 +504,7 @@ bridge_m_getprop(void *arg, const char *pr_name, mac_prop_id_t pr_num, switch (pr_num) { case MAC_PROP_STATUS: ASSERT(pr_valsize >= sizeof (bmp->bm_linkstate)); - bcopy(&bmp->bm_linkstate, pr_val, sizeof (&bmp->bm_linkstate)); + bcopy(&bmp->bm_linkstate, pr_val, sizeof (bmp->bm_linkstate)); break; default: diff --git a/usr/src/uts/common/io/fibre-channel/fca/oce/oce_gld.c b/usr/src/uts/common/io/fibre-channel/fca/oce/oce_gld.c index 846f8896d9..b16d6434b3 100644 --- a/usr/src/uts/common/io/fibre-channel/fca/oce/oce_gld.c +++ b/usr/src/uts/common/io/fibre-channel/fca/oce/oce_gld.c @@ -174,7 +174,7 @@ oce_m_multicast(void *arg, boolean_t add, const uint8_t *mca) return (EINVAL); } /* Allocate the local array for holding the addresses temporarily */ - bzero(&mca_hw_list, sizeof (&mca_hw_list)); + bzero(&mca_hw_list, sizeof (mca_hw_list)); mca_drv_list = &dev->multi_cast[0]; DEV_LOCK(dev); diff --git a/usr/src/uts/common/io/fibre-channel/fca/qlge/qlge.c b/usr/src/uts/common/io/fibre-channel/fca/qlge/qlge.c index cf20b75a66..239ac6f624 100644 --- a/usr/src/uts/common/io/fibre-channel/fca/qlge/qlge.c +++ b/usr/src/uts/common/io/fibre-channel/fca/qlge/qlge.c @@ -3388,7 +3388,7 @@ ql_alloc_tx_resources(qlge_t *qlge, struct tx_ring *tx_ring) (size_t)128, /* alignment:128 bytes boundary */ (caddr_t *)&tx_ring->wq_dma.vaddr, &dma_cookie) != 0) { - bzero(&tx_ring->wq_dma, sizeof (&tx_ring->wq_dma)); + bzero(&tx_ring->wq_dma, sizeof (tx_ring->wq_dma)); cmn_err(CE_WARN, "%s(%d): reqQ allocation failed.", __func__, qlge->instance); return (DDI_FAILURE); diff --git a/usr/src/uts/common/io/nxge/nxge_main.c b/usr/src/uts/common/io/nxge/nxge_main.c index 26da4c5af0..8c21366225 100644 --- a/usr/src/uts/common/io/nxge/nxge_main.c +++ b/usr/src/uts/common/io/nxge/nxge_main.c @@ -6533,7 +6533,7 @@ nxge_mac_register(p_nxge_t nxgep) } else { macp->m_src_addr = KMEM_ZALLOC(MAXMACADDRLEN, KM_SLEEP); macp->m_dst_addr = KMEM_ZALLOC(MAXMACADDRLEN, KM_SLEEP); - (void) memset(macp->m_src_addr, 0xff, sizeof (MAXMACADDRLEN)); + (void) memset(macp->m_src_addr, 0xff, MAXMACADDRLEN); } macp->m_callbacks = &nxge_m_callbacks; macp->m_min_sdu = 0; |
