All of lore.kernel.org
 help / color / mirror / Atom feed
* [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
@ 2020-05-07 15:29 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-05-07 15:29 UTC (permalink / raw)
  To: kbuild-all

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-07 15:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-07 15:29 [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 kbuild test robot

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.