[dpdk-test-report] |WARNING| pw53563 [PATCH 05/11] net/hinic/base: add eqs and context code
checkpatch at dpdk.org
checkpatch at dpdk.org
Tue May 21 10:10:48 CEST 2019
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/53563
_coding style issues_
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'max_sge' - possible side-effects?
#58: FILE: drivers/net/hinic/base/hinic_ctx_def.h:20:
+#define MAX_WQE_SIZE(max_sge, wqebb_size) \
+ ((max_sge <= 2) ? (wqebb_size) : \
+ ((ALIGN(((max_sge) - 2), 4) / 4 + 1) * (wqebb_size)))
CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'max_sge' may be better as '(max_sge)' to avoid precedence issues
#58: FILE: drivers/net/hinic/base/hinic_ctx_def.h:20:
+#define MAX_WQE_SIZE(max_sge, wqebb_size) \
+ ((max_sge <= 2) ? (wqebb_size) : \
+ ((ALIGN(((max_sge) - 2), 4) / 4 + 1) * (wqebb_size)))
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'wqebb_size' - possible side-effects?
#58: FILE: drivers/net/hinic/base/hinic_ctx_def.h:20:
+#define MAX_WQE_SIZE(max_sge, wqebb_size) \
+ ((max_sge <= 2) ? (wqebb_size) : \
+ ((ALIGN(((max_sge) - 2), 4) / 4 + 1) * (wqebb_size)))
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'max_sqs' - possible side-effects?
#81: FILE: drivers/net/hinic/base/hinic_ctx_def.h:43:
+#define RQ_CTXT_OFFSET(max_sqs, max_rqs, q_id) \
+ (((max_rqs) + (max_sqs)) * TSO_LRO_CTXT_SIZE \
+ + (max_sqs) * Q_CTXT_SIZE + (q_id) * Q_CTXT_SIZE)
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'eq' - possible side-effects?
#499: FILE: drivers/net/hinic/base/hinic_pmd_eqs.c:99:
+#define EQ_CONS_IDX(eq) ((eq)->cons_idx | \
+ ((u32)(eq)->wrapped << EQ_WRAPPED_SHIFT))
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'eq' - possible side-effects?
#502: FILE: drivers/net/hinic/base/hinic_pmd_eqs.c:102:
+#define EQ_CONS_IDX_REG_ADDR(eq) (((eq)->type == HINIC_AEQ) ? \
+ HINIC_CSR_AEQ_CONS_IDX_ADDR((eq)->q_id) :\
+ HINIC_CSR_CEQ_CONS_IDX_ADDR((eq)->q_id))
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'eq' - possible side-effects?
#506: FILE: drivers/net/hinic/base/hinic_pmd_eqs.c:106:
+#define EQ_PROD_IDX_REG_ADDR(eq) (((eq)->type == HINIC_AEQ) ? \
+ HINIC_CSR_AEQ_PROD_IDX_ADDR((eq)->q_id) :\
+ HINIC_CSR_CEQ_PROD_IDX_ADDR((eq)->q_id))
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'eq' - possible side-effects?
#510: FILE: drivers/net/hinic/base/hinic_pmd_eqs.c:110:
+#define GET_EQ_NUM_PAGES(eq, size) \
+ ((u16)(ALIGN((eq)->eq_len * (u32)(eq)->elem_size, (size)) \
+ / (size)))
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'size' - possible side-effects?
#510: FILE: drivers/net/hinic/base/hinic_pmd_eqs.c:110:
+#define GET_EQ_NUM_PAGES(eq, size) \
+ ((u16)(ALIGN((eq)->eq_len * (u32)(eq)->elem_size, (size)) \
+ / (size)))
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'eq' - possible side-effects?
#516: FILE: drivers/net/hinic/base/hinic_pmd_eqs.c:116:
+#define GET_EQ_ELEMENT(eq, idx) \
+ (((u8 *)(eq)->virt_addr[(idx) / (eq)->num_elem_in_pg]) + \
+ (((u32)(idx) & ((eq)->num_elem_in_pg - 1)) * (eq)->elem_size))
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'idx' - possible side-effects?
#516: FILE: drivers/net/hinic/base/hinic_pmd_eqs.c:116:
+#define GET_EQ_ELEMENT(eq, idx) \
+ (((u8 *)(eq)->virt_addr[(idx) / (eq)->num_elem_in_pg]) + \
+ (((u32)(idx) & ((eq)->num_elem_in_pg - 1)) * (eq)->elem_size))
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'eq' - possible side-effects?
#525: FILE: drivers/net/hinic/base/hinic_pmd_eqs.c:125:
+#define GET_CURR_AEQ_ELEM(eq) GET_AEQ_ELEM((eq), (eq)->cons_idx)
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'eq' - possible side-effects?
#527: FILE: drivers/net/hinic/base/hinic_pmd_eqs.c:127:
+#define GET_CURR_CEQ_ELEM(eq) GET_CEQ_ELEM((eq), (eq)->cons_idx)
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'eq' - possible side-effects?
#553: FILE: drivers/net/hinic/base/hinic_pmd_eqs.c:153:
+#define aeq_to_aeqs(eq) \
+ container_of((eq) - (eq)->q_id, struct hinic_aeqs, aeq[0])
CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#767: FILE: drivers/net/hinic/base/hinic_pmd_eqs.c:367:
+ eq->virt_addr[pg_num] = (u8 *)dma_zalloc_coherent_aligned(
total: 0 errors, 0 warnings, 15 checks, 1180 lines checked
More information about the test-report
mailing list