|WARNING| pw164573 [PATCH v5 1/1] net/mana: add device reset support
checkpatch at dpdk.org
checkpatch at dpdk.org
Fri May 29 16:27:03 CEST 2026
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/164573
_coding style issues_
WARNING:TYPO_SPELLING: 'CAS' may be misspelled - perhaps 'CASE'?
#478: FILE: drivers/net/mana/mana.c:980:
+ * Join the reset thread if it is active. Uses CAS on
^^^
CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#486: FILE: drivers/net/mana/mana.c:988:
+ if (rte_atomic_compare_exchange_strong_explicit(
CHECK:MACRO_ARG_REUSE: Macro argument reuse '_arg' - possible side-effects?
#577: FILE: drivers/net/mana/mana.c:1079:
+#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 (!pthread_mutex_trylock(&priv->reset_ops_lock)) { \
+ if (rte_atomic_load_explicit(&priv->dev_state, \
+ rte_memory_order_acquire) != \
+ MANA_DEV_ACTIVE) { \
+ pthread_mutex_unlock(&priv->reset_ops_lock); \
+ DRV_LOG(ERR, "Device reset in progress, " \
+ "%s not called", #_func); \
+ return; \
+ } \
+ _func(dev, _arg); \
+ pthread_mutex_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?
#604: FILE: drivers/net/mana/mana.c:1106:
+#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 (!pthread_mutex_trylock(&priv->reset_ops_lock)) { \
+ if (rte_atomic_load_explicit(&priv->dev_state, \
+ rte_memory_order_acquire) != \
+ MANA_DEV_ACTIVE) { \
+ pthread_mutex_unlock(&priv->reset_ops_lock); \
+ return -EBUSY; \
+ } \
+ ret = _func(dev, _arg); \
+ pthread_mutex_unlock(&priv->reset_ops_lock); \
+ } else { \
+ ret = -EBUSY; \
+ } \
+ return ret; \
+}
WARNING:TYPO_SPELLING: 'CAS' may be misspelled - perhaps 'CASE'?
#851: FILE: drivers/net/mana/mana.c:1514:
+ * Use CAS to avoid double-join if another path joined first.
^^^
CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#858: FILE: drivers/net/mana/mana.c:1521:
+ if (rte_atomic_compare_exchange_strong_explicit(
CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#1103: FILE: drivers/net/mana/mana.c:1760:
+ pthread_mutex_unlock(
CHECK:SPACING: No space is necessary after a cast
#1467: FILE: drivers/net/mana/mana.h:387:
+ RTE_ATOMIC(enum mana_device_state) dev_state;
CHECK:SPACING: No space is necessary after a cast
#1473: FILE: drivers/net/mana/mana.h:393:
+ RTE_ATOMIC(bool) reset_thread_active;
total: 0 errors, 2 warnings, 7 checks, 1669 lines checked
More information about the test-report
mailing list