summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2017-07-01 01:22:00 +0000
committerRobert Mustacchi <rm@joyent.com>2017-07-03 17:32:36 +0000
commitff73f18f0a2eaa07b0c466202e589ee320898043 (patch)
tree3ce83750b9a3d58479322d081b22b9df9dd16c3e
parentd997f81aa4b0770223512a813cd7c4532bc014cd (diff)
downloadillumos-joyent-ff73f18f0a2eaa07b0c466202e589ee320898043.tar.gz
cleanup -Wunused-variable and -Wunused-function
-rw-r--r--usr/src/uts/common/io/cxgbe/common/t4_hw.c2
-rw-r--r--usr/src/uts/common/io/cxgbe/t4nex/t4_l2t.c3
-rw-r--r--usr/src/uts/common/io/cxgbe/t4nex/t4_mac.c1
-rw-r--r--usr/src/uts/common/io/cxgbe/t4nex/t4_nexus.c2
-rw-r--r--usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c12
5 files changed, 12 insertions, 8 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 947b0b370a..1360d8a82d 100644
--- a/usr/src/uts/common/io/cxgbe/common/t4_hw.c
+++ b/usr/src/uts/common/io/cxgbe/common/t4_hw.c
@@ -345,7 +345,9 @@ void t4_record_mbox_marker(struct adapter *adapter,
int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd,
int size, void *rpl, bool sleep_ok, int timeout)
{
+#ifdef T4_OS_NEEDS_MBOX_LOCKING
u16 access = 0;
+#endif
u16 execute = 0;
u32 v;
u64 res;
diff --git a/usr/src/uts/common/io/cxgbe/t4nex/t4_l2t.c b/usr/src/uts/common/io/cxgbe/t4nex/t4_l2t.c
index f2762eaf1f..6d2a0159b4 100644
--- a/usr/src/uts/common/io/cxgbe/t4nex/t4_l2t.c
+++ b/usr/src/uts/common/io/cxgbe/t4nex/t4_l2t.c
@@ -139,6 +139,8 @@ struct l2t_data {
#define SIN(x) ((struct sockaddr_in *)(x))
#define SINADDR(x) (SIN(x)->sin_addr.s_addr)
#define atomic_read(x) atomic_add_int_nv(x, 0)
+
+#ifdef TCP_OFFLOAD_ENABLE
/*
* Allocate a free L2T entry.
* Must be called with l2t_data.lockatomic_load_acq_int held.
@@ -219,6 +221,7 @@ write_l2e(adapter_t *sc, struct l2t_entry *e, int sync)
return (0);
}
+#endif
struct l2t_data *
t4_init_l2t(struct adapter *sc)
diff --git a/usr/src/uts/common/io/cxgbe/t4nex/t4_mac.c b/usr/src/uts/common/io/cxgbe/t4nex/t4_mac.c
index 5dbf5fdfc2..97f6382f10 100644
--- a/usr/src/uts/common/io/cxgbe/t4nex/t4_mac.c
+++ b/usr/src/uts/common/io/cxgbe/t4nex/t4_mac.c
@@ -553,7 +553,6 @@ int
t4_ring_intr_disable(mac_intr_handle_t intrh)
{
struct sge_rxq *rxq = (struct sge_rxq *)intrh;
- struct adapter *sc = rxq->port->adapter;
struct sge_iq *iq;
/* Nothing to be done here wrt interrupt, as it
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 ebcf3f0e9a..e14493a88e 100644
--- a/usr/src/uts/common/io/cxgbe/t4nex/t4_nexus.c
+++ b/usr/src/uts/common/io/cxgbe/t4nex/t4_nexus.c
@@ -702,9 +702,9 @@ t4_devo_attach(dev_info_t *dip, ddi_attach_cmd_t cmd)
for_each_port(sc, i) {
struct port_info *pi = sc->port[i];
struct sge_rxq *rxq;
+#ifdef TCP_OFFLOAD_ENABLE
struct sge_ofld_rxq *ofld_rxq;
-#ifdef TCP_OFFLOAD_ENABLE
/*
* Skip over the NIC queues if they aren't taking direct
* interrupts.
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 f4459a1096..d5fd262e63 100644
--- a/usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c
+++ b/usr/src/uts/common/io/cxgbe/t4nex/t4_sge.c
@@ -185,7 +185,7 @@ t4_sge_init(struct adapter *sc)
ddi_dma_attr_t *dma_attr;
ddi_device_acc_attr_t *acc_attr;
uint32_t sge_control, sge_conm_ctrl;
- int ret, egress_threshold;
+ int egress_threshold;
/*
* Device access and DMA attributes for descriptor rings
@@ -455,10 +455,11 @@ port_intr_iq(struct port_info *pi, int idx)
int
t4_setup_port_queues(struct port_info *pi)
{
- int rc = 0, i, intr_idx, j, iqid;
+ int rc = 0, i, intr_idx, j;
struct sge_rxq *rxq;
struct sge_txq *txq;
#ifdef TCP_OFFLOAD_ENABLE
+ int iqid;
struct sge_wrq *ctrlq;
struct sge_ofld_rxq *ofld_rxq;
struct sge_wrq *ofld_txq;
@@ -601,8 +602,8 @@ t4_teardown_port_queues(struct port_info *pi)
int i;
struct sge_rxq *rxq;
struct sge_txq *txq;
- struct adapter *sc = pi->adapter;
#ifdef TCP_OFFLOAD_ENABLE
+ struct adapter *sc = pi->adapter;
struct sge_ofld_rxq *ofld_rxq;
struct sge_wrq *ofld_txq;
#endif
@@ -694,7 +695,6 @@ t4_intr(caddr_t arg1, caddr_t arg2)
{
/* LINTED: E_BAD_PTR_CAST_ALIGN */
struct sge_iq *iq = (struct sge_iq *)arg2;
- struct sge_rxq *rxq = iq_to_rxq(iq);
int state;
/* Right now receive polling is only enabled for MSI-X and
@@ -738,12 +738,12 @@ t4_intr_err(caddr_t arg1, caddr_t arg2)
mblk_t *
t4_ring_rx(struct sge_rxq *rxq, int budget)
{
- struct sge_iq *q, *iq = &rxq->iq;
+ struct sge_iq *iq = &rxq->iq;
struct sge_fl *fl = &rxq->fl; /* Use iff IQ_HAS_FL */
struct adapter *sc = iq->adapter;
struct rsp_ctrl *ctrl;
const struct rss_header *rss;
- int ndescs = 0, limit, fl_bufs_used = 0;
+ int ndescs = 0, fl_bufs_used = 0;
int rsp_type;
uint32_t lq;
mblk_t *mblk_head = NULL, **mblk_tail, *m;