[dpdk-test-report] |WARNING| pw92375 [PATCH v2 3/4] net/mlx5: support integrity flow item

checkpatch at dpdk.org checkpatch at dpdk.org
Thu Apr 29 08:18:03 CEST 2021


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

_coding style issues_


CHECK:MACRO_ARG_REUSE: Macro argument reuse '_s' - possible side-effects?
#212: FILE: drivers/net/mlx5/mlx5_flow.h:1024:
+#define MLX5_ETHER_TYPE_FROM_HEADER(_s, _m, _itm, _prt) do { \
+	(_prt) = ((const struct _s *)(_itm)->mask)->_m;       \
+	(_prt) &= ((const struct _s *)(_itm)->spec)->_m;      \
+	(_prt) = rte_be_to_cpu_16((_prt));                    \
+} while (0)

CHECK:MACRO_ARG_PRECEDENCE: Macro argument '_s' may be better as '(_s)' to avoid precedence issues
#212: FILE: drivers/net/mlx5/mlx5_flow.h:1024:
+#define MLX5_ETHER_TYPE_FROM_HEADER(_s, _m, _itm, _prt) do { \
+	(_prt) = ((const struct _s *)(_itm)->mask)->_m;       \
+	(_prt) &= ((const struct _s *)(_itm)->spec)->_m;      \
+	(_prt) = rte_be_to_cpu_16((_prt));                    \
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_m' - possible side-effects?
#212: FILE: drivers/net/mlx5/mlx5_flow.h:1024:
+#define MLX5_ETHER_TYPE_FROM_HEADER(_s, _m, _itm, _prt) do { \
+	(_prt) = ((const struct _s *)(_itm)->mask)->_m;       \
+	(_prt) &= ((const struct _s *)(_itm)->spec)->_m;      \
+	(_prt) = rte_be_to_cpu_16((_prt));                    \
+} while (0)

CHECK:MACRO_ARG_PRECEDENCE: Macro argument '_m' may be better as '(_m)' to avoid precedence issues
#212: FILE: drivers/net/mlx5/mlx5_flow.h:1024:
+#define MLX5_ETHER_TYPE_FROM_HEADER(_s, _m, _itm, _prt) do { \
+	(_prt) = ((const struct _s *)(_itm)->mask)->_m;       \
+	(_prt) &= ((const struct _s *)(_itm)->spec)->_m;      \
+	(_prt) = rte_be_to_cpu_16((_prt));                    \
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_itm' - possible side-effects?
#212: FILE: drivers/net/mlx5/mlx5_flow.h:1024:
+#define MLX5_ETHER_TYPE_FROM_HEADER(_s, _m, _itm, _prt) do { \
+	(_prt) = ((const struct _s *)(_itm)->mask)->_m;       \
+	(_prt) &= ((const struct _s *)(_itm)->spec)->_m;      \
+	(_prt) = rte_be_to_cpu_16((_prt));                    \
+} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse '_prt' - possible side-effects?
#212: FILE: drivers/net/mlx5/mlx5_flow.h:1024:
+#define MLX5_ETHER_TYPE_FROM_HEADER(_s, _m, _itm, _prt) do { \
+	(_prt) = ((const struct _s *)(_itm)->mask)->_m;       \
+	(_prt) &= ((const struct _s *)(_itm)->spec)->_m;      \
+	(_prt) = rte_be_to_cpu_16((_prt));                    \
+} while (0)

ERROR:TRAILING_STATEMENTS: trailing statements should be on next line
#228: FILE: drivers/net/mlx5/mlx5_flow.h:1305:
+	for (; item->type != RTE_FLOW_ITEM_TYPE_END; item++);

total: 1 errors, 0 warnings, 6 checks, 369 lines checked


More information about the test-report mailing list