Skip to contentSkip to conversation

cxgb4vf: Prefix adapter flags with CXGB4VF

PATCH Applied Arjun Vynipadath 2 participants 2 messages Mar 1, 2019 – Mar 2, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cxgb4vf: Prefix adapter flags with CXGB4VF

Some of these macros were conflicting with global namespace, hence prefixing them with CXGB4VF.

---
 drivers/net/ethernet/chelsio/cxgb4vf/adapter.h     | 12 ++--
 .../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c    | 68 +++++++++++-----------
 drivers/net/ethernet/chelsio/cxgb4vf/sge.c         | 10 ++--
 3 files changed, 47 insertions(+), 43 deletions(-)
drivers/net/ethernet/chelsio/cxgb4vf/adapter.h +6 -6
index 86cf68fceceb..3782e48dada2 100644
@@ -406,12 +406,12 @@ struct adapter {
 };
 
 enum { /* adapter flags */
-	FULL_INIT_DONE     = (1UL << 0),
-	USING_MSI          = (1UL << 1),
-	USING_MSIX         = (1UL << 2),
-	QUEUES_BOUND       = (1UL << 3),
-	ROOT_NO_RELAXED_ORDERING = (1UL << 4),
-	FW_OK              = (1UL << 5),
+	CXGB4VF_FULL_INIT_DONE			= (1UL << 0),
+	CXGB4VF_USING_MSI			= (1UL << 1),
+	CXGB4VF_USING_MSIX			= (1UL << 2),
+	CXGB4VF_QUEUES_BOUND			= (1UL << 3),
+	CXGB4VF_ROOT_NO_RELAXED_ORDERING	= (1UL << 4),
+	CXGB4VF_FW_OK				= (1UL << 5),
 };
 
 /*
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +35 -33

201 lines not on this page · raw message

drivers/net/ethernet/chelsio/cxgb4vf/sge.c +6 -4
index 11d2ba0a2bf5..f71c973398ec 100644
@@ -2044,8 +2044,9 @@ static irqreturn_t t4vf_intr_msi(int irq, void *cookie)
  */
 irq_handler_t t4vf_intr_handler(struct adapter *adapter)
 {
-	BUG_ON((adapter->flags & (USING_MSIX|USING_MSI)) == 0);
-	if (adapter->flags & USING_MSIX)
+	BUG_ON((adapter->flags &
+	       (CXGB4VF_USING_MSIX | CXGB4VF_USING_MSI)) == 0);
+	if (adapter->flags & CXGB4VF_USING_MSIX)
 		return t4vf_sge_intr_msix;
 	else
 		return t4vf_intr_msi;
@@ -2209,7 +2210,7 @@ int t4vf_sge_alloc_rxq(struct adapter *adapter, struct sge_rspq *rspq,
 	struct port_info *pi = netdev_priv(dev);
 	struct fw_iq_cmd cmd, rpl;
 	int ret, iqandst, flsz = 0;
-	int relaxed = !(adapter->flags & ROOT_NO_RELAXED_ORDERING);
+	int relaxed = !(adapter->flags & CXGB4VF_ROOT_NO_RELAXED_ORDERING);
 
 	/*
 	 * If we're using MSI interrupts and we're not initializing the
@@ -2218,7 +2219,8 @@ int t4vf_sge_alloc_rxq(struct adapter *adapter, struct sge_rspq *rspq,
 	 * the Forwarded Interrupt Queue must be set up before any other
 	 * ingress queue ...
 	 */
-	if ((adapter->flags & USING_MSI) && rspq != &adapter->sge.intrq) {
+	if ((adapter->flags & CXGB4VF_USING_MSI) &&
+	    rspq != &adapter->sge.intrq) {
 		iqandst = SGE_INTRDST_IQ;
 		intr_dest = adapter->sge.intrq.abs_id;
 	} else
Signature · 1 line
2.9.5