|WARNING| pw164260 [PATCH v3 1/2] net/mana: add device reset support
checkpatch at dpdk.org
checkpatch at dpdk.org
Fri May 22 08:59:36 CEST 2026
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/164260
_coding style issues_
CHECK:MACRO_ARG_REUSE: Macro argument reuse '_arg' - possible side-effects?
#507: FILE: drivers/net/mana/mana.c:1084:
+#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?
#534: FILE: drivers/net/mana/mana.c:1111:
+#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:OPEN_ENDED_LINE: Lines should not end with a '('
#1026: FILE: drivers/net/mana/mana.c:1758:
+ rte_spinlock_unlock(
CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#1063: FILE: drivers/net/mana/mana.c:1797:
+ ret = rte_dev_event_callback_unregister(
CHECK:SPACING: No space is necessary after a cast
#1382: FILE: drivers/net/mana/mana.h:387:
+ RTE_ATOMIC(enum mana_device_state) dev_state;
CHECK:SPACING: No space is necessary after a cast
#1388: FILE: drivers/net/mana/mana.h:393:
+ RTE_ATOMIC(bool) reset_thread_active;
total: 0 errors, 0 warnings, 6 checks, 1604 lines checked
More information about the test-report
mailing list