* [mingo-tip:sched/headers 1729/2356] mm/damon/ops-common.c:24:15: warning: incompatible integer to pointer conversion initializing 'struct page *' with an expression of type 'int'
@ 2022-04-19 3:36 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-19 3:36 UTC (permalink / raw)
To: Ingo Molnar; +Cc: llvm, kbuild-all, linux-kernel
tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: af93551cf39027d176f30b9beafc60a4c130998a
commit: 7eedc6a3354abcdcb3fbec4de62d4df0fa11c55d [1729/2356] headers/deps: mm/mmzone: Optimize <linux/mmzone.h> dependencies, remove <linux/memory_hotplug.h> inclusion
config: i386-randconfig-a015-20220418 (https://download.01.org/0day-ci/archive/20220419/202204191122.Mc8zEXBp-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 429cbac0390654f90bba18a41799464adf31a5ec)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=7eedc6a3354abcdcb3fbec4de62d4df0fa11c55d
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout 7eedc6a3354abcdcb3fbec4de62d4df0fa11c55d
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/block/ drivers/clk/ drivers/iio/accel/ drivers/infiniband/core/ drivers/infiniband/ulp/ipoib/ drivers/input/touchscreen/ drivers/mmc/host/ drivers/net/dsa/ drivers/nvdimm/ drivers/powercap/ drivers/usb/typec/ mm/damon/ net/dsa/ net/smc/ sound/soc/codecs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
mm/damon/ops-common.c:24:22: error: implicit declaration of function 'pfn_to_online_page' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
struct page *page = pfn_to_online_page(pfn);
^
>> mm/damon/ops-common.c:24:15: warning: incompatible integer to pointer conversion initializing 'struct page *' with an expression of type 'int' [-Wint-conversion]
struct page *page = pfn_to_online_page(pfn);
^ ~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +24 mm/damon/ops-common.c
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 14
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 15 /*
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 16 * Get an online page for a pfn if it's in the LRU list. Otherwise, returns
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 17 * NULL.
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 18 *
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 19 * The body of this function is stolen from the 'page_idle_get_page()'. We
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 20 * steal rather than reuse it because the code is quite simple.
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 21 */
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 22 struct page *damon_get_page(unsigned long pfn)
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 23 {
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 @24 struct page *page = pfn_to_online_page(pfn);
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 25
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 26 if (!page || !PageLRU(page) || !get_page_unless_zero(page))
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 27 return NULL;
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 28
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 29 if (unlikely(!PageLRU(page))) {
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 30 put_page(page);
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 31 page = NULL;
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 32 }
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 33 return page;
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 34 }
46c3a0accdc48c mm/damon/prmtv-common.c SeongJae Park 2021-11-05 35
:::::: The code at line 24 was first introduced by commit
:::::: 46c3a0accdc48c86928157fd073e66807f338485 mm/damon/vaddr: separate commonly usable functions
:::::: TO: SeongJae Park <sj@kernel.org>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-19 3:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-19 3:36 [mingo-tip:sched/headers 1729/2356] mm/damon/ops-common.c:24:15: warning: incompatible integer to pointer conversion initializing 'struct page *' with an expression of type 'int' 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).