git: 21186bdb2d6a - main - cxgbe: Various whitespace fixes.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Tue, 15 Nov 2022 20:04:21 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=21186bdb2d6a14dbfff7b4366425285b8612cc22

commit 21186bdb2d6a14dbfff7b4366425285b8612cc22
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-11-15 20:03:57 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-11-15 20:03:57 +0000

    cxgbe: Various whitespace fixes.
    
    Mostly trailing whitespace and spaces before tabs.
    
    Sponsored by:   Chelsio Communications
    Differential Revision:  https://reviews.freebsd.org/D37350
---
 sys/dev/cxgbe/adapter.h            | 18 +++++++++---------
 sys/dev/cxgbe/cudbg/cudbg.h        |  4 ++--
 sys/dev/cxgbe/cudbg/cudbg_common.c |  4 ++--
 sys/dev/cxgbe/iw_cxgbe/cm.c        | 12 ++++++------
 sys/dev/cxgbe/iw_cxgbe/cq.c        |  2 +-
 sys/dev/cxgbe/iw_cxgbe/mem.c       |  2 +-
 sys/dev/cxgbe/t4_main.c            | 23 ++++++++++++-----------
 sys/dev/cxgbe/t4_netmap.c          |  4 ++--
 sys/dev/cxgbe/t4_sge.c             |  6 +++---
 sys/dev/cxgbe/tom/t4_cpl_io.c      |  2 +-
 sys/dev/cxgbe/tom/t4_tls.c         |  6 +++---
 11 files changed, 42 insertions(+), 41 deletions(-)

diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h
index c62ada5b9225..665de371a2a2 100644
--- a/sys/dev/cxgbe/adapter.h
+++ b/sys/dev/cxgbe/adapter.h
@@ -125,7 +125,7 @@ enum {
 enum {
 	/* adapter intr_type */
 	INTR_INTX	= (1 << 0),
-	INTR_MSI 	= (1 << 1),
+	INTR_MSI	= (1 << 1),
 	INTR_MSIX	= (1 << 2)
 };
 
@@ -162,10 +162,10 @@ enum {
 	CXGBE_BUSY	= (1 << 9),
 
 	/* adapter error_flags.  reg_lock for HW_OFF_LIMITS, atomics for the rest. */
-	ADAP_STOPPED 	= (1 << 0),	/* Adapter has been stopped. */
-	ADAP_FATAL_ERR 	= (1 << 1),	/* Encountered a fatal error. */
-	HW_OFF_LIMITS 	= (1 << 2),	/* off limits to all except reset_thread */
-	ADAP_CIM_ERR 	= (1 << 3),	/* Error was related to FW/CIM. */
+	ADAP_STOPPED	= (1 << 0),	/* Adapter has been stopped. */
+	ADAP_FATAL_ERR	= (1 << 1),	/* Encountered a fatal error. */
+	HW_OFF_LIMITS	= (1 << 2),	/* off limits to all except reset_thread */
+	ADAP_CIM_ERR	= (1 << 3),	/* Error was related to FW/CIM. */
 
 	/* port flags */
 	HAS_TRACEQ	= (1 << 3),
@@ -175,8 +175,8 @@ enum {
 	DOOMED		= (1 << 0),
 	VI_INIT_DONE	= (1 << 1),
 	/* 1 << 2 is unused, was VI_SYSCTL_CTX */
-	TX_USES_VM_WR 	= (1 << 3),
-	VI_SKIP_STATS 	= (1 << 4),
+	TX_USES_VM_WR	= (1 << 3),
+	VI_SKIP_STATS	= (1 << 4),
 
 	/* adapter debug_flags */
 	DF_DUMP_MBOX		= (1 << 0),	/* Log all mbox cmd/rpl. */
@@ -219,7 +219,7 @@ struct vi_info {
 	/* These need to be int as they are used in sysctl */
 	int ntxq;		/* # of tx queues */
 	int first_txq;		/* index of first tx queue */
-	int rsrv_noflowq; 	/* Reserve queue 0 for non-flowid packets */
+	int rsrv_noflowq;	/* Reserve queue 0 for non-flowid packets */
 	int nrxq;		/* # of rx queues */
 	int first_rxq;		/* index of first rx queue */
 	int nofldtxq;		/* # of offload tx queues */
@@ -329,7 +329,7 @@ struct port_info {
 	struct link_config link_cfg;
 	struct ifmedia media;
 
- 	struct port_stats stats;
+	struct port_stats stats;
 	u_int tnl_cong_drops;
 	u_int tx_parse_error;
 	int fcs_reg;
diff --git a/sys/dev/cxgbe/cudbg/cudbg.h b/sys/dev/cxgbe/cudbg/cudbg.h
index ae6c21ad095d..497ff4777856 100644
--- a/sys/dev/cxgbe/cudbg/cudbg.h
+++ b/sys/dev/cxgbe/cudbg/cudbg.h
@@ -452,8 +452,8 @@ void cudbg_free_handle(IN void *handle);
 
 /**
  *  cudbg_read_flash_data - Read cudbg “flash” header from adapter flash.
- *  			    This will be used by the consumer mainly to
- *  			    know the size of the data in flash.
+ *			    This will be used by the consumer mainly to
+ *			    know the size of the data in flash.
  *  ## Parameters ##
  *  @handle : A pointer returned by cudbg_hello.
  *  @data : A pointer to data/header buffer
diff --git a/sys/dev/cxgbe/cudbg/cudbg_common.c b/sys/dev/cxgbe/cudbg/cudbg_common.c
index f780e626da0c..841c3867ab07 100644
--- a/sys/dev/cxgbe/cudbg/cudbg_common.c
+++ b/sys/dev/cxgbe/cudbg/cudbg_common.c
@@ -61,8 +61,8 @@ void release_scratch_buff(struct cudbg_buffer *pscratch_buff,
 {
 	pdbg_buff->size += pscratch_buff->size;
 	/* Reset the used buffer to zero.
- 	 * If we dont do this, then it will effect the ext entity logic.
- 	 */
+	 * If we dont do this, then it will effect the ext entity logic.
+	 */
 	memset(pscratch_buff->data, 0, pscratch_buff->size);
 	pscratch_buff->data = NULL;
 	pscratch_buff->offset = 0;
diff --git a/sys/dev/cxgbe/iw_cxgbe/cm.c b/sys/dev/cxgbe/iw_cxgbe/cm.c
index 3cca89f71435..08d507524c01 100644
--- a/sys/dev/cxgbe/iw_cxgbe/cm.c
+++ b/sys/dev/cxgbe/iw_cxgbe/cm.c
@@ -234,8 +234,8 @@ struct listen_port_info {
  *   |listen_port_list  |
  *   |------------------|
  *            |
- *            |              |-----------|       |-----------|  
- *            |              | port_num:X|       | port_num:X|  
+ *            |              |-----------|       |-----------|
+ *            |              | port_num:X|       | port_num:X|
  *            |--------------|-list------|-------|-list------|-------....
  *                           | lep_list----|     | lep_list----|
  *                           | refcnt    | |     | refcnt    | |
@@ -245,13 +245,13 @@ struct listen_port_info {
  *                                         |                   |
  *                                         |                   |
  *                                         |                   |
- *                                         |                   |         lep1                  lep2         
+ *                                         |                   |         lep1                  lep2
  *                                         |                   |    |----------------|    |----------------|
  *                                         |                   |----| listen_ep_list |----| listen_ep_list |
  *                                         |                        |----------------|    |----------------|
  *                                         |
  *                                         |
- *                                         |        lep1                  lep2         
+ *                                         |        lep1                  lep2
  *                                         |   |----------------|    |----------------|
  *                                         |---| listen_ep_list |----| listen_ep_list |
  *                                             |----------------|    |----------------|
@@ -260,7 +260,7 @@ struct listen_port_info {
  * each TCP port number.
  *
  * Here 'lep1' is always marked as Master lep, because solisten() is always
- * called through first lep. 
+ * called through first lep.
  *
  */
 static struct listen_port_info *
@@ -1117,7 +1117,7 @@ process_socket_event(struct c4iw_ep *ep)
 
 	if (ep->com.state == DEAD) {
 		CTR3(KTR_IW_CXGBE, "%s: Pending socket event discarded "
-			"ep %p ep_state %s", __func__, ep, states[state]); 
+		    "ep %p ep_state %s", __func__, ep, states[state]);
 		return;
 	}
 
diff --git a/sys/dev/cxgbe/iw_cxgbe/cq.c b/sys/dev/cxgbe/iw_cxgbe/cq.c
index ab49e643e02d..5f57eebc0dc9 100644
--- a/sys/dev/cxgbe/iw_cxgbe/cq.c
+++ b/sys/dev/cxgbe/iw_cxgbe/cq.c
@@ -135,7 +135,7 @@ create_cq(struct c4iw_rdev *rdev, struct t4_cq *cq,
 
 	wr = alloc_wrqe(wr_len, &sc->sge.ctrlq[0]);
 	if (wr == NULL)
-        	return (0);
+		return (0);
         res_wr = wrtod(wr);
 
 	memset(res_wr, 0, wr_len);
diff --git a/sys/dev/cxgbe/iw_cxgbe/mem.c b/sys/dev/cxgbe/iw_cxgbe/mem.c
index c6eb8cff6da9..865523969660 100644
--- a/sys/dev/cxgbe/iw_cxgbe/mem.c
+++ b/sys/dev/cxgbe/iw_cxgbe/mem.c
@@ -489,7 +489,7 @@ struct ib_mr *c4iw_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
 	}
 
 	shift = ffs(mhp->umem->page_size) - 1;
-	
+
 	n = mhp->umem->nmap;
 	err = alloc_pbl(mhp, n);
 	if (err)
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 25d9831c2019..261fe16d1bc9 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -112,8 +112,8 @@ static device_method_t t4_methods[] = {
 	DEVMETHOD(device_resume,	t4_resume),
 
 	DEVMETHOD(bus_child_location,	t4_child_location),
-	DEVMETHOD(bus_reset_prepare, 	t4_reset_prepare),
-	DEVMETHOD(bus_reset_post, 	t4_reset_post),
+	DEVMETHOD(bus_reset_prepare,	t4_reset_prepare),
+	DEVMETHOD(bus_reset_post,	t4_reset_post),
 
 	DEVMETHOD(t4_is_main_ready,	t4_ready),
 	DEVMETHOD(t4_read_port_device,	t4_read_port_device),
@@ -177,8 +177,8 @@ static device_method_t t5_methods[] = {
 	DEVMETHOD(device_resume,	t4_resume),
 
 	DEVMETHOD(bus_child_location,	t4_child_location),
-	DEVMETHOD(bus_reset_prepare, 	t4_reset_prepare),
-	DEVMETHOD(bus_reset_post, 	t4_reset_post),
+	DEVMETHOD(bus_reset_prepare,	t4_reset_prepare),
+	DEVMETHOD(bus_reset_post,	t4_reset_post),
 
 	DEVMETHOD(t4_is_main_ready,	t4_ready),
 	DEVMETHOD(t4_read_port_device,	t4_read_port_device),
@@ -216,8 +216,8 @@ static device_method_t t6_methods[] = {
 	DEVMETHOD(device_resume,	t4_resume),
 
 	DEVMETHOD(bus_child_location,	t4_child_location),
-	DEVMETHOD(bus_reset_prepare, 	t4_reset_prepare),
-	DEVMETHOD(bus_reset_post, 	t4_reset_post),
+	DEVMETHOD(bus_reset_prepare,	t4_reset_prepare),
+	DEVMETHOD(bus_reset_post,	t4_reset_post),
 
 	DEVMETHOD(t4_is_main_ready,	t4_ready),
 	DEVMETHOD(t4_read_port_device,	t4_read_port_device),
@@ -1126,7 +1126,7 @@ t4_calibration(void *arg)
 
 	cur = &sc->cal_info[sc->cal_current];
 	next_up = (sc->cal_current + 1) % CNT_CAL_INFO;
-       	nex = &sc->cal_info[next_up];
+	nex = &sc->cal_info[next_up];
 	if (__predict_false(sc->cal_count == 0)) {
 		/* First time in, just get the values in */
 		cur->hw_cur = hw;
@@ -1988,6 +1988,7 @@ t4_suspend(device_t dev)
 
 	/* No more DMA or interrupts. */
 	stop_adapter(sc);
+
 	/* Quiesce all activity. */
 	for_each_port(sc, i) {
 		pi = sc->port[i];
@@ -2432,7 +2433,7 @@ t4_resume(device_t dev)
 	}
 
 	/* Reset all calibration */
-	t4_calibration_start(sc);	
+	t4_calibration_start(sc);
 
 done:
 	if (rc == 0) {
@@ -9134,7 +9135,7 @@ dump_cimla(struct adapter *sc)
 		rc = sbuf_finish(&sb);
 		if (rc == 0) {
 			log(LOG_DEBUG, "%s: CIM LA dump follows.\n%s\n",
-		    		device_get_nameunit(sc->dev), sbuf_data(&sb));
+			    device_get_nameunit(sc->dev), sbuf_data(&sb));
 		}
 	}
 	sbuf_delete(&sb);
@@ -9575,7 +9576,7 @@ dump_devlog(struct adapter *sc)
 		rc = sbuf_finish(&sb);
 		if (rc == 0) {
 			log(LOG_DEBUG, "%s: device log follows.\n%s",
-		    		device_get_nameunit(sc->dev), sbuf_data(&sb));
+			    device_get_nameunit(sc->dev), sbuf_data(&sb));
 		}
 	}
 	sbuf_delete(&sb);
@@ -13079,7 +13080,7 @@ DB_FUNC(tcb, db_show_t4tcb, db_t4_table, CS_OWN, NULL)
 			tid = db_tok_number;
 			valid = true;
 		}
-	}	
+	}
 	db_radix = radix;
 	db_skip_to_eol();
 	if (!valid) {
diff --git a/sys/dev/cxgbe/t4_netmap.c b/sys/dev/cxgbe/t4_netmap.c
index 0f9aee784aa5..06c9c98136f5 100644
--- a/sys/dev/cxgbe/t4_netmap.c
+++ b/sys/dev/cxgbe/t4_netmap.c
@@ -470,7 +470,7 @@ alloc_nm_txq_hwq(struct vi_info *vi, struct sge_nm_txq *nm_txq)
 		udb += (nm_txq->cntxt_id >> s_qpp) << PAGE_SHIFT;
 		nm_txq->udb_qid = nm_txq->cntxt_id & mask;
 		if (nm_txq->udb_qid >= PAGE_SIZE / UDBS_SEG_SIZE)
-	    		clrbit(&nm_txq->doorbells, DOORBELL_WCWR);
+			clrbit(&nm_txq->doorbells, DOORBELL_WCWR);
 		else {
 			udb += nm_txq->udb_qid << UDBS_SEG_SHIFT;
 			nm_txq->udb_qid = 0;
@@ -1437,7 +1437,7 @@ service_nm_rxq(struct sge_nm_rxq *nm_rxq)
 	} else if (nframes > 0)
 		netmap_rx_irq(ifp, nm_rxq->nid, &work);
 
-    	t4_write_reg(sc, sc->sge_gts_reg, V_CIDXINC(ndesc) |
+	t4_write_reg(sc, sc->sge_gts_reg, V_CIDXINC(ndesc) |
 	    V_INGRESSQID((u32)nm_rxq->iq_cntxt_id) |
 	    V_SEINTARM(V_QINTR_TIMER_IDX(holdoff_tmr_idx)));
 }
diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c
index 954e8f58e3e9..8dbb9e1fe93a 100644
--- a/sys/dev/cxgbe/t4_sge.c
+++ b/sys/dev/cxgbe/t4_sge.c
@@ -2046,7 +2046,7 @@ have_mbuf:
 		    (cpl->l2info & htobe32(F_RXF_IP6)));
 		m0->m_pkthdr.csum_data = be16toh(cpl->csum);
 		if (tnl_type == 0) {
-	    		if (!ipv6 && ifp->if_capenable & IFCAP_RXCSUM) {
+			if (!ipv6 && ifp->if_capenable & IFCAP_RXCSUM) {
 				m0->m_pkthdr.csum_flags = CSUM_L3_CALC |
 				    CSUM_L3_VALID | CSUM_L4_CALC |
 				    CSUM_L4_VALID;
@@ -2813,7 +2813,7 @@ restart:
 
 	if (!needs_hwcsum(m0)
 #ifdef RATELIMIT
-   		 && !needs_eo(mst)
+		 && !needs_eo(mst)
 #endif
 	)
 		return (0);
@@ -4520,7 +4520,7 @@ alloc_eq_hwq(struct adapter *sc, struct vi_info *vi, struct sge_eq *eq)
 		udb += (eq->cntxt_id >> s_qpp) << PAGE_SHIFT;	/* pg offset */
 		eq->udb_qid = eq->cntxt_id & mask;		/* id in page */
 		if (eq->udb_qid >= PAGE_SIZE / UDBS_SEG_SIZE)
-	    		clrbit(&eq->doorbells, DOORBELL_WCWR);
+			clrbit(&eq->doorbells, DOORBELL_WCWR);
 		else {
 			udb += eq->udb_qid << UDBS_SEG_SHIFT;	/* seg offset */
 			eq->udb_qid = 0;
diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c
index 7449029a7082..528af1414381 100644
--- a/sys/dev/cxgbe/tom/t4_cpl_io.c
+++ b/sys/dev/cxgbe/tom/t4_cpl_io.c
@@ -1412,7 +1412,7 @@ do_peer_close(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m)
 	switch (tp->t_state) {
 	case TCPS_SYN_RECEIVED:
 		tp->t_starttime = ticks;
-		/* FALLTHROUGH */ 
+		/* FALLTHROUGH */
 
 	case TCPS_ESTABLISHED:
 		tcp_state_change(tp, TCPS_CLOSE_WAIT);
diff --git a/sys/dev/cxgbe/tom/t4_tls.c b/sys/dev/cxgbe/tom/t4_tls.c
index 9f9d4a48de93..017b13700db6 100644
--- a/sys/dev/cxgbe/tom/t4_tls.c
+++ b/sys/dev/cxgbe/tom/t4_tls.c
@@ -494,7 +494,7 @@ tls_uninit_toep(struct toepcb *toep)
 
 #define MAX_OFLD_TX_CREDITS (SGE_MAX_WR_LEN / 16)
 #define	MIN_OFLD_TLSTX_CREDITS(toep)					\
-	(howmany(sizeof(struct fw_tlstx_data_wr) + 			\
+	(howmany(sizeof(struct fw_tlstx_data_wr) +			\
 	    sizeof(struct cpl_tx_tls_sfo) + sizeof(struct ulptx_idata) + \
 	    sizeof(struct ulptx_sc_memrd) +				\
 	    AES_BLOCK_LEN + 1, 16))
@@ -524,7 +524,7 @@ write_tlstx_wr(struct fw_tlstx_data_wr *txwr, struct toepcb *toep,
 	    V_FW_TLSTX_DATA_WR_ADJUSTEDPLEN(tls_ofld->adjusted_plen));
 	txwr->expinplenmax_pkd = htobe16(
 	    V_FW_TLSTX_DATA_WR_EXPINPLENMAX(tls_ofld->expn_per_ulp));
-	txwr->pdusinplenmax_pkd = 
+	txwr->pdusinplenmax_pkd =
 	    V_FW_TLSTX_DATA_WR_PDUSINPLENMAX(tls_ofld->pdus_per_ulp);
 }
 
@@ -760,7 +760,7 @@ t4_push_ktls(struct adapter *sc, struct toepcb *toep, int drop)
 			toep->flags |= TPF_TX_SUSPENDED;
 			return;
 		}
-	
+
 		/* Shove if there is no additional data pending. */
 		shove = ((m->m_next == NULL ||
 		    (m->m_next->m_flags & M_NOTAVAIL) != 0)) &&