[sbates130272-p2pmem:p2pdma_user_cmb_v5 21/23] drivers/pci/p2pdma.c:108:38: sparse: sparse: dereference of noderef expression

From: kernel test robot
Date: Tue Dec 28 2021 - 02:54:00 EST


tree: https://github.com/sbates130272/linux-p2pmem.git p2pdma_user_cmb_v5
head: 407e0b007d670af84abbb624d9bbd4057b31a7d9
commit: 987aec4824931d2be618b29001359e633aa96988 [21/23] mm: use custom page_free for P2PDMA pages
config: x86_64-randconfig-s021-20211228 (https://download.01.org/0day-ci/archive/20211228/202112281530.kK94gKnk-lkp@xxxxxxxxx/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/sbates130272/linux-p2pmem/commit/987aec4824931d2be618b29001359e633aa96988
git remote add sbates130272-p2pmem https://github.com/sbates130272/linux-p2pmem.git
git fetch --no-tags sbates130272-p2pmem p2pdma_user_cmb_v5
git checkout 987aec4824931d2be618b29001359e633aa96988
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/pci/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
>> drivers/pci/p2pdma.c:108:38: sparse: sparse: dereference of noderef expression
>> drivers/pci/p2pdma.c:108:38: sparse: sparse: dereference of noderef expression

vim +108 drivers/pci/p2pdma.c

103
104 static void p2pdma_page_free(struct page *page)
105 {
106 struct pci_p2pdma_pagemap *pgmap = to_p2p_pgmap(page->pgmap);
107
> 108 gen_pool_free(pgmap->provider->p2pdma->pool,
109 (uintptr_t)page_to_virt(page), PAGE_SIZE);
110 }
111

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx