From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: Ziyang Xuan <xuanziyang2@huawei.com>
Subject: [dpdk-test-report] |WARNING| pw54169 [PATCH v3 07/11] net/hinic/base: add various headers
Date: Mon, 3 Jun 2019 13:28:40 +0200 (CEST) [thread overview]
Message-ID: <20190603112840.169221B9B2@dpdk.org> (raw)
In-Reply-To: <88b8d7f81208f4148a500f477415a92bc6c35256.1559553895.git.xuanziyang2@huawei.com>
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
parent reply other threads:[~2019-06-03 11:28 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <88b8d7f81208f4148a500f477415a92bc6c35256.1559553895.git.xuanziyang2@huawei.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190603112840.169221B9B2@dpdk.org \
--to=checkpatch@dpdk.org \
--cc=test-report@dpdk.org \
--cc=xuanziyang2@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).