From: kernel test robot <lkp@intel.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: kbuild-all@lists.01.org, linux-ia64@vger.kernel.org,
linux-kernel@vger.kernel.org,
Xiaochen Shen <xiaochen.shen@intel.com>
Subject: [aegl:dsa_page_zero_prototype 17/39] drivers/dma/idxd/ktest.c:76:5: error: variable 'status' set but not used
Date: Fri, 12 Nov 2021 12:22:17 +0800 [thread overview]
Message-ID: <202111121211.TD5KKPgW-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3304 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git dsa_page_zero_prototype
head: 443bff56d346197a2f8c09c7159ebc9e7440429b
commit: 2b2a2452424b633e0ee5d2d209a949ee619a4f5c [17/39] dmaengine: idxd: add a test module for kdirect API
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git/commit/?id=2b2a2452424b633e0ee5d2d209a949ee619a4f5c
git remote add aegl https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git
git fetch --no-tags aegl dsa_page_zero_prototype
git checkout 2b2a2452424b633e0ee5d2d209a949ee619a4f5c
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/dma/idxd/ktest.c: In function 'submit_memmove_operation':
>> drivers/dma/idxd/ktest.c:76:5: error: variable 'status' set but not used [-Werror=unused-but-set-variable]
76 | u8 status;
| ^~~~~~
cc1: all warnings being treated as errors
vim +/status +76 drivers/dma/idxd/ktest.c
63
64 static int submit_memmove_operation(struct dma_chan *chan,
65 struct dmatest_thread *thread,
66 struct dmatest_data *src,
67 struct dmatest_data *dst,
68 unsigned int len,
69 int timeout)
70 {
71 struct dma_device *dma = chan->device;
72 struct dmatest_done *done = &thread->test_done;
73 struct idxd_desc *desc;
74 struct dsa_hw_desc *hw;
75 struct dma_async_tx_descriptor *tx;
> 76 u8 status;
77 dma_cookie_t cookie;
78
79 desc = (struct idxd_desc *)dma->kdops.device_get_desc(chan, IDXD_OP_BLOCK);
80 if (IS_ERR(desc)) {
81 pr_warn("desc alloc failed\n");
82 return PTR_ERR(desc);
83 }
84
85 tx = &desc->txd;
86 tx->flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT;
87
88 hw = desc->hw;
89 hw->flags = IDXD_OP_FLAG_CRAV | IDXD_OP_FLAG_RCR | IDXD_OP_FLAG_RCI;
90 hw->opcode = DSA_OPCODE_MEMMOVE;
91 hw->src_addr = (u64)(src->aligned[0] + src->off);
92 hw->dst_addr = (u64)(dst->aligned[0] + dst->off);
93 hw->xfer_size = len;
94 hw->priv = 1;
95 hw->completion_addr = (u64)desc->completion;
96 /* int_handle and pasid filled by alloc_desc */
97
98 done->done = false;
99 tx->callback = idxd_ktest_callback;
100 tx->callback_param = done;
101
102 cookie = tx->tx_submit(tx);
103
104 if (dma_submit_error(cookie)) {
105 pr_warn("%s submit error!", __func__);
106 msleep(100);
107 return -ENXIO;
108 }
109
110 dma_async_issue_pending(chan);
111
112 wait_event_freezable_timeout(thread->done_wait, done->done, timeout);
113
114 status = dma_async_is_tx_complete(chan, cookie, NULL, NULL);
115
116 if (!done->done) {
117 pr_warn("%s: test timed out!", __func__);
118 return -ENXIO;
119 }
120
121 return 0;
122 }
123
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 66496 bytes --]
reply other threads:[~2021-11-12 4:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202111121211.TD5KKPgW-lkp@intel.com \
--to=lkp@intel.com \
--cc=dave.jiang@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xiaochen.shen@intel.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