diff options
author | Toomas Soome <tsoome@me.com> | 2020-01-30 15:17:38 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2020-06-08 21:24:25 +0300 |
commit | e214b19eaa16fec1fa60a97227778103f598336f (patch) | |
tree | 3efd9e3644b261f00dfd76873d3f60294ed5a265 /usr/src/uts/sun4v | |
parent | 08219281a2f1c9e03d7d81800df78a7f6131e89a (diff) | |
download | illumos-joyent-e214b19eaa16fec1fa60a97227778103f598336f.tar.gz |
12577 px: NULL pointer errors
Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
Reviewed by: Gary Mills <gary_mills@fastmail.fm>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/uts/sun4v')
-rw-r--r-- | usr/src/uts/sun4v/io/px/px_err.c | 4 | ||||
-rw-r--r-- | usr/src/uts/sun4v/io/px/px_lib4v.c | 2 | ||||
-rw-r--r-- | usr/src/uts/sun4v/io/px/px_tools_4v.c | 2 | ||||
-rw-r--r-- | usr/src/uts/sun4v/px/Makefile | 25 |
4 files changed, 4 insertions, 29 deletions
diff --git a/usr/src/uts/sun4v/io/px/px_err.c b/usr/src/uts/sun4v/io/px/px_err.c index e99ca6b882..3bdd99aaf6 100644 --- a/usr/src/uts/sun4v/io/px/px_err.c +++ b/usr/src/uts/sun4v/io/px/px_err.c @@ -151,7 +151,7 @@ px_err_fill_pfd(dev_info_t *dip, pf_data_t *pfd_p, px_rc_err_t *epkt) { case BLOCK_MMU: /* Only PIO Fault Addresses are valid, this is DMA */ s_status = PCI_STAT_S_TARG_AB; - fault_addr = NULL; + fault_addr = 0; if (epkt->rc_descr.H) { fault_bdf = (pcie_req_id_t)(epkt->hdr[0] >> 16); @@ -836,7 +836,7 @@ px_mmu_handle_lookup(dev_info_t *dip, ddi_fm_error_t *derr, px_rc_err_t *epkt) pcie_req_id_t bdf = PCIE_INVALID_BDF; if (epkt->rc_descr.H) { - bdf = (uint32_t)((epkt->hdr[0] >> 16) && 0xFFFF); + bdf = (uint32_t)((epkt->hdr[0] >> 16) & 0xFFFF); } return (pf_hdl_lookup(dip, derr->fme_ena, PF_ADDR_DMA, addr, diff --git a/usr/src/uts/sun4v/io/px/px_lib4v.c b/usr/src/uts/sun4v/io/px/px_lib4v.c index 54bcd03bef..710379950c 100644 --- a/usr/src/uts/sun4v/io/px/px_lib4v.c +++ b/usr/src/uts/sun4v/io/px/px_lib4v.c @@ -1686,7 +1686,7 @@ px_lib_log_safeacc_err(px_t *px_p, ddi_acc_handle_t handle, int fme_flag, } } - (void) px_rp_en_q(px_p, bdf, addr, NULL); + (void) px_rp_en_q(px_p, bdf, addr, 0); (void) px_scan_fabric(px_p, px_p->px_dip, &derr); px_fm_exit(px_p); } diff --git a/usr/src/uts/sun4v/io/px/px_tools_4v.c b/usr/src/uts/sun4v/io/px/px_tools_4v.c index 42ec37636b..288fa61e10 100644 --- a/usr/src/uts/sun4v/io/px/px_tools_4v.c +++ b/usr/src/uts/sun4v/io/px/px_tools_4v.c @@ -184,7 +184,7 @@ pxtool_phys_access(px_t *px_p, uintptr_t dev_addr, from_addr = dev_addr; } - rval = hv_hpriv((void *)pfunc, from_addr, to_addr, NULL); + rval = hv_hpriv((void *)pfunc, from_addr, to_addr, 0); switch (rval) { case H_ENOACCESS: /* Returned by non-debug hypervisor. */ rval = ENOTSUP; diff --git a/usr/src/uts/sun4v/px/Makefile b/usr/src/uts/sun4v/px/Makefile index d3b224707a..c63335e3b0 100644 --- a/usr/src/uts/sun4v/px/Makefile +++ b/usr/src/uts/sun4v/px/Makefile @@ -37,7 +37,6 @@ UTSBASE = ../.. # MODULE = px OBJECTS = $(PX_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(PX_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) # @@ -55,7 +54,6 @@ CLEANFILES += $(MODSTUBS_O) # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) # @@ -64,27 +62,10 @@ INSTALL_TARGET = $(BINARY) $(ROOTMODULE) INC_PATH += -I$(UTSBASE)/sun4/io/px # -# lint pass one enforcement -# -CFLAGS += $(CCVERBOSE) - -# # Turn on doubleword alignment for 64 bit registers # CFLAGS += -dalign -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED -LINTTAGS += -erroff=E_STATIC_UNUSED -LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV - CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-type-limits CERRWARN += -_gcc=-Wno-clobbered @@ -109,12 +90,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # |