linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [aegl:dsa_page_zero_prototype 17/39] drivers/dma/idxd/ktest.c:76:5: error: variable 'status' set but not used
@ 2021-11-12  4:22 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-11-12  4:22 UTC (permalink / raw)
  To: Dave Jiang; +Cc: kbuild-all, linux-ia64, linux-kernel, Xiaochen Shen

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-12  4:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12  4:22 [aegl:dsa_page_zero_prototype 17/39] drivers/dma/idxd/ktest.c:76:5: error: variable 'status' set but not used kernel test robot

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).