diff options
author | Robert Mustacchi <rm@joyent.com> | 2017-07-11 17:38:55 +0000 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2017-07-11 17:38:49 +0000 |
commit | f5cbb2eb91c994ad03d3ff136afae15a8fe5991f (patch) | |
tree | d69625c2af8e7c6a88ccdffbae4afb6e90e92da8 | |
parent | bf74c488e9db30727ab39d3ec804fa1ef8250e9e (diff) | |
download | illumos-joyent-dev-t6.tar.gz |
fix various lint issuesdev-t6
-rw-r--r-- | usr/src/uts/common/io/cxgbe/common/t4_hw.c | 9 | ||||
-rw-r--r-- | usr/src/uts/common/io/cxgbe/firmware/t4fw_interface.h | 2 | ||||
-rw-r--r-- | usr/src/uts/common/io/cxgbe/t4nex/adapter.h | 4 | ||||
-rw-r--r-- | usr/src/uts/common/io/cxgbe/t4nex/t4_nexus.c | 4 | ||||
-rw-r--r-- | usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c | 6 | ||||
-rw-r--r-- | usr/src/uts/intel/cxgbe/t4nex/Makefile | 26 |
6 files changed, 40 insertions, 11 deletions
diff --git a/usr/src/uts/common/io/cxgbe/common/t4_hw.c b/usr/src/uts/common/io/cxgbe/common/t4_hw.c index 1360d8a82d..ef4d935c7a 100644 --- a/usr/src/uts/common/io/cxgbe/common/t4_hw.c +++ b/usr/src/uts/common/io/cxgbe/common/t4_hw.c @@ -474,7 +474,7 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd, CH_DUMP_MBOX(adap, mbox, data_reg, size / 8); t4_write_reg(adap, ctl_reg, F_MBMSGVALID | V_MBOWNER(X_MBOWNER_FW)); - t4_read_reg(adap, ctl_reg); /* flush write */ + (void) t4_read_reg(adap, ctl_reg); /* flush write */ /* * Loop waiting for the reply; bail out if we time out or the firmware @@ -6094,7 +6094,7 @@ void t4_read_mtu_tbl(struct adapter *adap, u16 *mtus, u8 *mtu_log) for (i = 0; i < NMTUS; ++i) { t4_write_reg(adap, A_TP_MTU_TABLE, - V_MTUINDEX(0xff) | V_MTUVALUE(i)); + V_MTUINDEX(0xffU) | V_MTUVALUE(i)); v = t4_read_reg(adap, A_TP_MTU_TABLE); mtus[i] = G_MTUVALUE(v); if (mtu_log) @@ -6117,7 +6117,7 @@ void t4_read_cong_tbl(struct adapter *adap, u16 incr[NMTUS][NCCTRL_WIN]) for (mtu = 0; mtu < NMTUS; ++mtu) for (w = 0; w < NCCTRL_WIN; ++w) { t4_write_reg(adap, A_TP_CCTRL_TABLE, - V_ROWINDEX(0xffff) | (mtu << 5) | w); + V_ROWINDEX(0xffffU) | (mtu << 5) | w); incr[mtu][w] = (u16)t4_read_reg(adap, A_TP_CCTRL_TABLE) & 0x1fff; } @@ -7951,10 +7951,13 @@ int t4_alloc_vi_func(struct adapter *adap, unsigned int mbox, switch (nmac) { case 5: memcpy(mac + 24, c.nmac3, sizeof(c.nmac3)); + /* FALLTHRU */ case 4: memcpy(mac + 18, c.nmac2, sizeof(c.nmac2)); + /* FALLTHRU */ case 3: memcpy(mac + 12, c.nmac1, sizeof(c.nmac1)); + /* FALLTHRU */ case 2: memcpy(mac + 6, c.nmac0, sizeof(c.nmac0)); } diff --git a/usr/src/uts/common/io/cxgbe/firmware/t4fw_interface.h b/usr/src/uts/common/io/cxgbe/firmware/t4fw_interface.h index c9a8b8d0ec..01d9db43fe 100644 --- a/usr/src/uts/common/io/cxgbe/firmware/t4fw_interface.h +++ b/usr/src/uts/common/io/cxgbe/firmware/t4fw_interface.h @@ -2007,7 +2007,7 @@ enum fw_ri_init_p2ptype { }; enum fw_ri_init_rqeqid_srq { - FW_RI_INIT_RQEQID_SRQ = 1 << 31, + FW_RI_INIT_RQEQID_SRQ = 1U << 31, }; struct fw_ri_wr { diff --git a/usr/src/uts/common/io/cxgbe/t4nex/adapter.h b/usr/src/uts/common/io/cxgbe/t4nex/adapter.h index 4991004314..cf6fd497fd 100644 --- a/usr/src/uts/common/io/cxgbe/t4nex/adapter.h +++ b/usr/src/uts/common/io/cxgbe/t4nex/adapter.h @@ -792,7 +792,7 @@ static inline int t4_os_pci_read_seeprom(adapter_t *adapter, int addr, u32 *valp) { int t4_seeprom_read(struct adapter *adapter, u32 addr, u32 *data); - ssize_t ret; + int ret; ret = t4_seeprom_read(adapter, addr, valp); @@ -813,7 +813,7 @@ static inline int t4_os_pci_write_seeprom(adapter_t *adapter, int addr, u32 val) { int t4_seeprom_write(struct adapter *adapter, u32 addr, u32 data); - ssize_t ret; + int ret; ret = t4_seeprom_write(adapter, addr, val); diff --git a/usr/src/uts/common/io/cxgbe/t4nex/t4_nexus.c b/usr/src/uts/common/io/cxgbe/t4nex/t4_nexus.c index 3bfead03a3..5607385283 100644 --- a/usr/src/uts/common/io/cxgbe/t4nex/t4_nexus.c +++ b/usr/src/uts/common/io/cxgbe/t4nex/t4_nexus.c @@ -1530,7 +1530,7 @@ adap__pre_init_tweaks(struct adapter *sc) * Line Size, etc. The firmware default is for a 4KB Page Size and * 64B Cache Line Size ... */ - t4_fixup_host_params_compat(sc, PAGE_SIZE, CACHE_LINE, T5_LAST_REV); + (void) t4_fixup_host_params_compat(sc, PAGE_SIZE, CACHE_LINE, T5_LAST_REV); t4_set_reg_field(sc, A_SGE_CONTROL, V_PKTSHIFT(M_PKTSHIFT), V_PKTSHIFT(rx_dma_offset)); @@ -2016,7 +2016,7 @@ init_driver_props(struct adapter *sc, struct driver_properties *p) p->multi_rings = 1; } - ddi_prop_update_int(dev, dip, "multi-rings", p->multi_rings); + (void) ddi_prop_update_int(dev, dip, "multi-rings", p->multi_rings); return (0); } diff --git a/usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c b/usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c index d5fd262e63..6f68670bc9 100644 --- a/usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c +++ b/usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c @@ -319,7 +319,7 @@ t4_sge_init(struct adapter *sc) (void) t4_register_cpl_handler(sc, CPL_FW4_MSG, handle_fw_rpl); (void) t4_register_cpl_handler(sc, CPL_FW6_MSG, handle_fw_rpl); - t4_register_cpl_handler(sc, CPL_SGE_EGR_UPDATE, handle_sge_egr_update); + (void) t4_register_cpl_handler(sc, CPL_SGE_EGR_UPDATE, handle_sge_egr_update); (void) t4_register_cpl_handler(sc, CPL_RX_PKT, t4_eth_rx); (void) t4_register_fw_msg_handler(sc, FW6_TYPE_CMD_RPL, t4_handle_fw_rpl); @@ -705,8 +705,8 @@ t4_intr(caddr_t arg1, caddr_t arg2) } else { state = atomic_cas_uint(&iq->state, IQS_IDLE, IQS_BUSY); if (state == IQS_IDLE) { - service_iq(iq, 0); - atomic_cas_uint(&iq->state, IQS_BUSY, IQS_IDLE); + (void) service_iq(iq, 0); + (void) atomic_cas_uint(&iq->state, IQS_BUSY, IQS_IDLE); } } return (DDI_INTR_CLAIMED); diff --git a/usr/src/uts/intel/cxgbe/t4nex/Makefile b/usr/src/uts/intel/cxgbe/t4nex/Makefile index 4fa7beeba0..6ebef6a7ea 100644 --- a/usr/src/uts/intel/cxgbe/t4nex/Makefile +++ b/usr/src/uts/intel/cxgbe/t4nex/Makefile @@ -66,6 +66,32 @@ LINTFLAGS += -I$(UTSBASE)/common/io/cxgbe -I$(UTSBASE)/common/io/cxgbe/common \ LINTFLAGS += -Xc99=%all # +# A lot of these come from the fact that there are static inlines and +# that this driver leverages various C99 and some GNU C extensions. +# +LINTTAGS += -erroff=E_STATIC_UNUSED +LINTTAGS += -erroff=E_FUNC_ARG_UNUSED +LINTTAGS += -erroff=E_ZERO_OR_NEGATIVE_SUBSCRIPT +LINTTAGS += -erroff=E_ZERO_SIZED_STRUCT_UNION +LINTTAGS += -erroff=E_ANONYMOUS_UNION_DECL +LINTTAGS += -erroff=E_CONSTANT_CONDITION + +# +# These have been manually verified at the moment. When updating this +# driver, please manually check the following lint warnings. Note some +# of these are due to limitations in Sun Studio. +# +LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN +LINTTAGS += -erroff=E_ENUM_VAL_OVERFLOWS_INT_MAX +LINTTAGS += -erroff=E_FUNC_NO_RET_VAL +LINTTAGS += -erroff=E_NOP_IF_STMT +LINTTAGS += -erroff=E_FUNC_SET_NOT_USED +LINTTAGS += -erroff=E_FUNC_RET_ALWAYS_IGNOR2 +LINTTAGS += -erroff=E_FUNC_RET_MAYBE_IGNORED2 +LINTTAGS += -erroff=E_CASE_FALLTHRU +LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV + +# # Default build targets. # .KEEP_STATE: |