All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [hch-dma-mapping:for-next 9/10] net/core/page_pool.c:406:47: error: passing 'const struct page *' to parameter of type 'struct page *' discards qualifiers
Date: Wed, 8 May 2024 01:51:34 +0800	[thread overview]
Message-ID: <202405080101.0mPUjuAp-lkp@intel.com> (raw)

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: riscv-defconfig (https://download.01.org/0day-ci/archive/20240508/202405080101.0mPUjuAp-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 0ab4458df0688955620b72cc2c72a32dffad3615)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240508/202405080101.0mPUjuAp-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/202405080101.0mPUjuAp-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from net/core/page_pool.c:13:
   In file included from include/net/page_pool/helpers.h:55:
   In file included from include/net/page_pool/types.h:7:
   In file included from include/linux/ptr_ring.h:26:
   In file included from include/linux/mm.h:2210:
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> net/core/page_pool.c:406:47: error: passing 'const struct page *' to parameter of type 'struct page *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
     406 |         dma_addr_t dma_addr = page_pool_get_dma_addr(page);
         |                                                      ^~~~
   include/net/page_pool/helpers.h:373:62: note: passing argument to parameter 'page' here
     373 | static inline dma_addr_t page_pool_get_dma_addr(struct page *page)
         |                                                              ^
   1 warning and 1 error generated.


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

                 reply	other threads:[~2024-05-07 17:51 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=202405080101.0mPUjuAp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hch@lst.de \
    --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.