All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pavel Begunkov <asml.silence@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [isilence:zc/veth 5/7] io_uring/zc_rx.c:116:20: warning: unused variable 'addr'
Date: Sat, 14 Oct 2023 06:41:32 +0800	[thread overview]
Message-ID: <202310140601.NUM9TjyM-lkp@intel.com> (raw)

tree:   https://github.com/isilence/linux zc/veth
head:   cff8a226d561bc0db814b65ca5d2c97894d4d1cd
commit: 87d67390f5c169ff9ae3ed9748e59e5cfb540d70 [5/7] veth: zc_rx support
config: um-defconfig (https://download.01.org/0day-ci/archive/20231014/202310140601.NUM9TjyM-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231014/202310140601.NUM9TjyM-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310140601.NUM9TjyM-lkp@intel.com/

All warnings (new ones prefixed by >>):

   io_uring/zc_rx.c: In function 'io_zc_rx_map_buf':
>> io_uring/zc_rx.c:116:20: warning: unused variable 'addr' [-Wunused-variable]
     116 |         dma_addr_t addr;
         |                    ^~~~
   io_uring/zc_rx.c: At top level:
   io_uring/zc_rx.c:185:5: warning: no previous prototype for 'io_zc_rx_create_pool' [-Wmissing-prototypes]
     185 | int io_zc_rx_create_pool(struct io_ring_ctx *ctx,
         |     ^~~~~~~~~~~~~~~~~~~~


vim +/addr +116 io_uring/zc_rx.c

568ae4bf1dd0e1 David Wei      2023-08-14  112  
de471788991400 David Wei      2023-08-11  113  static int io_zc_rx_map_buf(struct device *dev, struct page *page, u16 pool_id,
de471788991400 David Wei      2023-08-11  114  			    u32 pgid, struct io_zc_rx_buf *buf)
de471788991400 David Wei      2023-08-11  115  {
de471788991400 David Wei      2023-08-11 @116  	dma_addr_t addr;
de471788991400 David Wei      2023-08-11  117  
de471788991400 David Wei      2023-08-11  118  	SetPagePrivate(page);
de471788991400 David Wei      2023-08-11  119  	set_page_private(page, mk_page_info(pool_id, pgid));
de471788991400 David Wei      2023-08-11  120  
87d67390f5c169 Pavel Begunkov 2023-10-12  121  	// addr = dma_map_page_attrs(dev, page, 0, PAGE_SIZE,
87d67390f5c169 Pavel Begunkov 2023-10-12  122  	// 			  DMA_BIDIRECTIONAL,
87d67390f5c169 Pavel Begunkov 2023-10-12  123  	// 			  DMA_ATTR_SKIP_CPU_SYNC);
87d67390f5c169 Pavel Begunkov 2023-10-12  124  	// if (dma_mapping_error(dev, addr)) {
87d67390f5c169 Pavel Begunkov 2023-10-12  125  	// 	set_page_private(page, 0);
87d67390f5c169 Pavel Begunkov 2023-10-12  126  	// 	ClearPagePrivate(page);
87d67390f5c169 Pavel Begunkov 2023-10-12  127  	// 	return -ENOMEM;
87d67390f5c169 Pavel Begunkov 2023-10-12  128  	// }
87d67390f5c169 Pavel Begunkov 2023-10-12  129  	buf->dma = 0;
87d67390f5c169 Pavel Begunkov 2023-10-12  130  	// buf->dma = addr;
de471788991400 David Wei      2023-08-11  131  
de471788991400 David Wei      2023-08-11  132  	buf->page = page;
de471788991400 David Wei      2023-08-11  133  	atomic_set(&buf->refcount, 0);
de471788991400 David Wei      2023-08-11  134  	get_page(page);
de471788991400 David Wei      2023-08-11  135  
de471788991400 David Wei      2023-08-11  136  	return 0;
de471788991400 David Wei      2023-08-11  137  }
de471788991400 David Wei      2023-08-11  138  

:::::: The code at line 116 was first introduced by commit
:::::: de471788991400859db2362ac41d6f1d2662820a io_uring: add ZC buf and pool

:::::: TO: David Wei <davidhwei@meta.com>
:::::: CC: David Wei <davidhwei@meta.com>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2023-10-13 22:42 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=202310140601.NUM9TjyM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=asml.silence@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.