|WARNING| pw163830 [PATCH v2 1/1] net/mana: add device reset support

checkpatch at dpdk.org checkpatch at dpdk.org
Sat May 9 08:01:27 CEST 2026


Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/163830

_coding style issues_


CHECK:MACRO_ARG_REUSE: Macro argument reuse '_arg' - possible side-effects?
#492: FILE: drivers/net/mana/mana.c:1074:
+#define MANA_OPS_3_LOCK(_func, _arg)					\
+static void								\
+_func##_lock(struct rte_eth_dev *dev, uint16_t _arg)			\
+{									\
+	struct mana_priv *priv = dev->data->dev_private;		\
+	if (rte_spinlock_trylock(&priv->reset_ops_lock)) {		\
+		if (rte_atomic_load_explicit(&priv->dev_state,		\
+		    rte_memory_order_acquire) !=			\
+		    MANA_DEV_ACTIVE) {					\
+			rte_spinlock_unlock(&priv->reset_ops_lock);	\
+			DRV_LOG(ERR, "Device reset in progress, "	\
+				"%s not called", #_func);		\
+			return;						\
+		}							\
+		_func(dev, _arg);					\
+		rte_spinlock_unlock(&priv->reset_ops_lock);		\
+	} else {							\
+		DRV_LOG(ERR, "Device reset in progress, "		\
+			"%s not called", #_func);			\
+	}								\
+}

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_arg' - possible side-effects?
#519: FILE: drivers/net/mana/mana.c:1101:
+#define MANA_OPS_4_LOCK(_func, _arg)					\
+static int								\
+_func##_lock(struct rte_eth_dev *dev, uint16_t _arg)			\
+{									\
+	struct mana_priv *priv = dev->data->dev_private;		\
+	int ret;							\
+	if (rte_spinlock_trylock(&priv->reset_ops_lock)) {		\
+		if (rte_atomic_load_explicit(&priv->dev_state,		\
+		    rte_memory_order_acquire) !=			\
+		    MANA_DEV_ACTIVE) {					\
+			rte_spinlock_unlock(&priv->reset_ops_lock);	\
+			return -EBUSY;					\
+		}							\
+		ret = _func(dev, _arg);					\
+		rte_spinlock_unlock(&priv->reset_ops_lock);		\
+	} else {							\
+		ret = -EBUSY;						\
+	}								\
+	return ret;							\
+}

CHECK:SPACING: No space is necessary after a cast
#1303: FILE: drivers/net/mana/mana.h:387:
+	RTE_ATOMIC(enum mana_device_state) dev_state;

total: 0 errors, 0 warnings, 3 checks, 1526 lines checked


More information about the test-report mailing list