Print this page
10703 smatch unreachable code checking needs reworking
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>

*** 23,33 **** * Copyright 2008 NetXen, Inc. All rights reserved. * Use is subject to license terms. */ /* ! * Copyright (c) 2018, Joyent, Inc. */ #include <sys/types.h> #include <sys/conf.h> #include <sys/debug.h> --- 23,33 ---- * Copyright 2008 NetXen, Inc. All rights reserved. * Use is subject to license terms. */ /* ! * Copyright 2019 Joyent, Inc. */ #include <sys/types.h> #include <sys/conf.h> #include <sys/debug.h>
*** 702,712 **** rv = unm_nic_pci_get_crb_addr_2M(adapter, &off, len); if (rv == -1) { cmn_err(CE_PANIC, "%s: invalid offset: 0x%016llx\n", __FUNCTION__, off); - return (-1); } if (rv == 1) { UNM_WRITE_LOCK_IRQS(&adapter->adapter_lock, flags); crb_win_lock(adapter); --- 702,711 ----
*** 811,821 **** rv = unm_nic_pci_get_crb_addr_2M(adapter, &off, len); if (rv == -1) { cmn_err(CE_PANIC, "%s: invalid offset: 0x%016llx\n", __FUNCTION__, off); - return (-1); } if (rv == 1) { UNM_WRITE_LOCK_IRQS(&adapter->adapter_lock, flags); crb_win_lock(adapter); --- 810,819 ----
*** 951,961 **** if (ADDR_IN_RANGE(addr, UNM_ADDR_DDR_NET, UNM_ADDR_DDR_NET_MAX)) { /* DDR network side */ /* MN access should never come here */ cmn_err(CE_PANIC, "%s\n", __FUNCTION__); - addr = -1ULL; } else if (ADDR_IN_RANGE(addr, UNM_ADDR_OCM0, UNM_ADDR_OCM0_MAX)) { addr -= UNM_ADDR_OCM0; addr += UNM_PCI_OCM0; } else if (ADDR_IN_RANGE(addr, UNM_ADDR_OCM1, UNM_ADDR_OCM1_MAX)) { addr -= UNM_ADDR_OCM1; --- 949,958 ----