From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [joro:vmalloc-sync 1/7] include/linux/mm.h:2252:9: warning: returning 'int' from a function with return type 'pte_t *' {aka 'long unsigned int *'} makes pointer from integer without a cast
Date: Thu, 07 May 2020 23:29:39 +0800 [thread overview]
Message-ID: <202005072336.45DceIre%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3369 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/joro/linux.git vmalloc-sync
head: 6cf448bfc585dee8f380e6b1681707e6faf7a254
commit: 81841ceb1b2a27530139b9fb5bb0579b4fbd524e [1/7] mm: Add functions to track page-table modifications
config: arm-mps2_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 81841ceb1b2a27530139b9fb5bb0579b4fbd524e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/arm/kernel/asm-offsets.c:10:
include/linux/mm.h: In function 'pte_alloc_kernel_track':
include/linux/mm.h:2246:15: error: implicit declaration of function 'pmd_none'; did you mean 'p4d_none'? [-Werror=implicit-function-declaration]
2246 | if (unlikely(pmd_none(*(pmd)))) {
| ^~~~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
In file included from arch/arm/kernel/asm-offsets.c:12:
include/linux/mm.h:2252:9: error: implicit declaration of function 'pte_offset_kernel' [-Werror=implicit-function-declaration]
2252 | return pte_offset_kernel(pmd, address);
| ^~~~~~~~~~~~~~~~~
>> include/linux/mm.h:2252:9: warning: returning 'int' from a function with return type 'pte_t *' {aka 'long unsigned int *'} makes pointer from integer without a cast [-Wint-conversion]
2252 | return pte_offset_kernel(pmd, address);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:100: arch/arm/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1141: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:180: sub-make] Error 2
vim +2252 include/linux/mm.h
2231
2232 #define pte_alloc_map(mm, pmd, address) \
2233 (pte_alloc(mm, pmd) ? NULL : pte_offset_map(pmd, address))
2234
2235 #define pte_alloc_map_lock(mm, pmd, address, ptlp) \
2236 (pte_alloc(mm, pmd) ? \
2237 NULL : pte_offset_map_lock(mm, pmd, address, ptlp))
2238
2239 #define pte_alloc_kernel(pmd, address) \
2240 ((unlikely(pmd_none(*(pmd))) && __pte_alloc_kernel(pmd))? \
2241 NULL: pte_offset_kernel(pmd, address))
2242
2243 static inline pte_t *pte_alloc_kernel_track(pmd_t *pmd, unsigned long address,
2244 pgtbl_mod_mask *mod_mask)
2245 {
2246 if (unlikely(pmd_none(*(pmd)))) {
2247 if (__pte_alloc_kernel(pmd))
2248 return NULL;
2249 *mod_mask |= PGTBL_PMD_MODIFIED;
2250 }
2251
> 2252 return pte_offset_kernel(pmd, address);
2253 }
2254 #if USE_SPLIT_PMD_PTLOCKS
2255
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 10531 bytes --]
reply other threads:[~2020-05-07 15:29 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=202005072336.45DceIre%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 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.