All of lore.kernel.org
 help / color / mirror / Atom feed
* [isilence:zc/veth 5/7] io_uring/zc_rx.c:116:20: warning: unused variable 'addr'
@ 2023-10-13 22:41 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-10-13 22:41 UTC (permalink / raw)
  To: Pavel Begunkov; +Cc: oe-kbuild-all

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

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

only message in thread, other threads:[~2023-10-13 22:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-13 22:41 [isilence:zc/veth 5/7] io_uring/zc_rx.c:116:20: warning: unused variable 'addr' kernel test robot

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.