[dpdk-test-report] |WARNING| pw54169 [PATCH v3 07/11] net/hinic/base: add various headers

checkpatch at dpdk.org checkpatch at dpdk.org
Mon Jun 3 13:28:40 CEST 2019


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

_coding style issues_


CHECK:MACRO_ARG_REUSE: Macro argument reuse 'Y' - possible side-effects?
#114: FILE: drivers/net/hinic/base/hinic_compat.h:71:
+#define DIV_ROUND_UP(X, Y) (((X) + ((Y) - 1)) / (Y))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'Y' - possible side-effects?
#117: FILE: drivers/net/hinic/base/hinic_compat.h:74:
+#define ROUND_UP(X, Y) (DIV_ROUND_UP(X, Y) * (Y))

CHECK:CONCATENATED_STRING: Concatenated strings should use spaces between elements
#131: FILE: drivers/net/hinic/base/hinic_compat.h:88:
+		HINIC_DRIVER_NAME": " fmt "
", ##args)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'wq' - possible side-effects?
#1058: FILE: drivers/net/hinic/base/hinic_qe_def.h:281:
+#define WQ_SIZE(wq)		(u32)((u64)(wq)->q_depth * (wq)->wqebb_size)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'wq' - possible side-effects?
#1060: FILE: drivers/net/hinic/base/hinic_qe_def.h:283:
+#define	WQE_PAGE_NUM(wq, idx)	(((idx) >> ((wq)->wqebbs_per_page_shift)) & \
+				((wq)->num_q_pages - 1))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'wq' - possible side-effects?
#1063: FILE: drivers/net/hinic/base/hinic_qe_def.h:286:
+#define	WQE_PAGE_OFF(wq, idx)	((u64)((wq)->wqebb_size) * \
+				((idx) & ((wq)->num_wqebbs_per_page - 1)))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'wq' - possible side-effects?
#1068: FILE: drivers/net/hinic/base/hinic_qe_def.h:291:
+#define WQ_PAGE_ADDR(wq, idx)		\
+		(u8 *)(*(u64 *)((u64)((wq)->shadow_block_vaddr) + \
+		(WQE_PAGE_NUM(wq, idx) << WQ_PAGE_ADDR_SIZE_SHIFT)))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'wq' - possible side-effects?
#1084: FILE: drivers/net/hinic/base/hinic_qe_def.h:307:
+#define WQ_BASE_VADDR(wqs, wq)		\
+		(u64 *)(((u64)((wqs)->page_vaddr[(wq)->page_idx])) \
+				+ (wq)->block_idx * WQ_BLOCK_SIZE)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'wq' - possible side-effects?
#1088: FILE: drivers/net/hinic/base/hinic_qe_def.h:311:
+#define WQ_BASE_PADDR(wqs, wq)	(((wqs)->page_paddr[(wq)->page_idx]) \
+				+ (u64)(wq)->block_idx * WQ_BLOCK_SIZE)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'wq' - possible side-effects?
#1091: FILE: drivers/net/hinic/base/hinic_qe_def.h:314:
+#define WQ_BASE_ADDR(wqs, wq)		\
+		(u64 *)(((u64)((wqs)->shadow_page_vaddr[(wq)->page_idx])) \
+				+ (wq)->block_idx * WQ_BLOCK_SIZE)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'wq' - possible side-effects?
#1109: FILE: drivers/net/hinic/base/hinic_qe_def.h:332:
+#define WQE_SHADOW_PAGE(wq, wqe)	\
+		(u16)(((unsigned long)(wqe) - (unsigned long)(wq)->shadow_wqe) \
+		/ (wq)->max_wqe_size)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'wqe' - possible side-effects?
#1113: FILE: drivers/net/hinic/base/hinic_qe_def.h:336:
+#define WQE_IN_RANGE(wqe, start, end)	\
+		(((unsigned long)(wqe) >= (unsigned long)(start)) && \
+		((unsigned long)(wqe) < (unsigned long)(end)))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'rxq' - possible side-effects?
#1353: FILE: drivers/net/hinic/hinic_pmd_rx.h:12:
+#define HINIC_GET_RQ_LOCAL_CI(rxq)	\
+	(((rxq)->wq->cons_idx) & HINIC_GET_RQ_WQE_MASK(rxq))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'rxq' - possible side-effects?
#1356: FILE: drivers/net/hinic/hinic_pmd_rx.h:15:
+#define HINIC_GET_RQ_LOCAL_PI(rxq)	\
+	(((rxq)->wq->prod_idx) & HINIC_GET_RQ_WQE_MASK(rxq))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'rxq' - possible side-effects?
#1359: FILE: drivers/net/hinic/hinic_pmd_rx.h:18:
+#define HINIC_UPDATE_RQ_LOCAL_CI(rxq, wqebb_cnt)	\
+	do {						\
+		(rxq)->wq->cons_idx += (wqebb_cnt);	\
+		(rxq)->wq->delta += (wqebb_cnt);	\
+	} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'wqebb_cnt' - possible side-effects?
#1359: FILE: drivers/net/hinic/hinic_pmd_rx.h:18:
+#define HINIC_UPDATE_RQ_LOCAL_CI(rxq, wqebb_cnt)	\
+	do {						\
+		(rxq)->wq->cons_idx += (wqebb_cnt);	\
+		(rxq)->wq->delta += (wqebb_cnt);	\
+	} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'rxq' - possible side-effects?
#1368: FILE: drivers/net/hinic/hinic_pmd_rx.h:27:
+#define HINIC_UPDATE_RQ_HW_PI(rxq, pi)	\
+	(*((rxq)->pi_virt_addr) =	\
+		cpu_to_be16((pi) & HINIC_GET_RQ_WQE_MASK(rxq)))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'txq' - possible side-effects?
#1497: FILE: drivers/net/hinic/hinic_pmd_tx.h:15:
+#define HINIC_GET_SQ_HW_CI(txq)	\
+	((be16_to_cpu(*(txq)->cons_idx_addr)) & HINIC_GET_SQ_WQE_MASK(txq))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'txq' - possible side-effects?
#1500: FILE: drivers/net/hinic/hinic_pmd_tx.h:18:
+#define HINIC_GET_SQ_LOCAL_CI(txq)	\
+	(((txq)->wq->cons_idx) & HINIC_GET_SQ_WQE_MASK(txq))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'txq' - possible side-effects?
#1503: FILE: drivers/net/hinic/hinic_pmd_tx.h:21:
+#define HINIC_UPDATE_SQ_LOCAL_CI(txq, wqebb_cnt)	\
+	do {						\
+		(txq)->wq->cons_idx += wqebb_cnt;	\
+		(txq)->wq->delta += wqebb_cnt;		\
+	} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'wqebb_cnt' - possible side-effects?
#1503: FILE: drivers/net/hinic/hinic_pmd_tx.h:21:
+#define HINIC_UPDATE_SQ_LOCAL_CI(txq, wqebb_cnt)	\
+	do {						\
+		(txq)->wq->cons_idx += wqebb_cnt;	\
+		(txq)->wq->delta += wqebb_cnt;		\
+	} while (0)

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'txq' - possible side-effects?
#1512: FILE: drivers/net/hinic/hinic_pmd_tx.h:30:
+#define HINIC_IS_SQ_EMPTY(txq)	\
+		(((txq)->wq->delta) == ((txq)->q_depth))

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'txq' - possible side-effects?
#1515: FILE: drivers/net/hinic/hinic_pmd_tx.h:33:
+#define HINIC_GET_WQ_TAIL(txq) ((txq)->wq->queue_buf_vaddr + \
+				(txq)->wq->wq_buf_size)

total: 0 errors, 0 warnings, 23 checks, 1506 lines checked


More information about the test-report mailing list