* [hch-dma-mapping:for-next 9/10] net/core/page_pool.c:406:54: warning: passing argument 1 of 'page_pool_get_dma_addr' discards 'const' qualifier from pointer target type
@ 2024-05-07 17:19 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-05-07 17:19 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: oe-kbuild-all
tree: git://git.infradead.org/users/hch/dma-mapping for-next
head: 66772d621cbea3d8acfeda4ba1f411030798d26f
commit: 8bf4d7154d4c0d281666e5595a843be89147d352 [9/10] page_pool: check for DMA sync shortcut earlier
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240508/202405080109.cZObB5j9-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240508/202405080109.cZObB5j9-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/202405080109.cZObB5j9-lkp@intel.com/
All warnings (new ones prefixed by >>):
net/core/page_pool.c: In function '__page_pool_dma_sync_for_device':
>> net/core/page_pool.c:406:54: warning: passing argument 1 of 'page_pool_get_dma_addr' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
406 | dma_addr_t dma_addr = page_pool_get_dma_addr(page);
| ^~~~
In file included from net/core/page_pool.c:13:
include/net/page_pool/helpers.h:373:62: note: expected 'struct page *' but argument is of type 'const struct page *'
373 | static inline dma_addr_t page_pool_get_dma_addr(struct page *page)
| ~~~~~~~~~~~~~^~~~
vim +406 net/core/page_pool.c
ff7d6b27f894f1 Jesper Dangaard Brouer 2018-04-17 400
8bf4d7154d4c0d Alexander Lobakin 2024-05-07 401 static void __page_pool_dma_sync_for_device(const struct page_pool *pool,
8bf4d7154d4c0d Alexander Lobakin 2024-05-07 402 const struct page *page,
8bf4d7154d4c0d Alexander Lobakin 2024-05-07 403 u32 dma_sync_size)
e68bc75691cc3d Lorenzo Bianconi 2019-11-20 404 {
8bf4d7154d4c0d Alexander Lobakin 2024-05-07 405 #if defined(CONFIG_HAS_DMA) && defined(CONFIG_DMA_NEED_SYNC)
9ddb3c14afba8b Matthew Wilcox (Oracle 2021-05-14 @406) dma_addr_t dma_addr = page_pool_get_dma_addr(page);
9ddb3c14afba8b Matthew Wilcox (Oracle 2021-05-14 407)
e68bc75691cc3d Lorenzo Bianconi 2019-11-20 408 dma_sync_size = min(dma_sync_size, pool->p.max_len);
8bf4d7154d4c0d Alexander Lobakin 2024-05-07 409 __dma_sync_single_for_device(pool->p.dev, dma_addr + pool->p.offset,
8bf4d7154d4c0d Alexander Lobakin 2024-05-07 410 dma_sync_size, pool->p.dma_dir);
8bf4d7154d4c0d Alexander Lobakin 2024-05-07 411 #endif
8bf4d7154d4c0d Alexander Lobakin 2024-05-07 412 }
8bf4d7154d4c0d Alexander Lobakin 2024-05-07 413
:::::: The code at line 406 was first introduced by commit
:::::: 9ddb3c14afba8bc5950ed297f02d4ae05ff35cd1 mm: fix struct page layout on 32-bit systems
:::::: TO: Matthew Wilcox (Oracle) <willy@infradead.org>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
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:[~2024-05-07 17:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-07 17:19 [hch-dma-mapping:for-next 9/10] net/core/page_pool.c:406:54: warning: passing argument 1 of 'page_pool_get_dma_addr' discards 'const' qualifier from pointer target type 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).