mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [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'
Date: Tue, 19 Apr 2022 11:36:24 +0800	[thread overview]
Message-ID: <202204191122.Mc8zEXBp-lkp@intel.com> (raw)

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

                 reply	other threads:[~2022-04-19  3:37 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=202204191122.Mc8zEXBp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mingo@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®