All of lore.kernel.org
 help / color / mirror / Atom feed
* [luto:x86/mm 1/7] include/linux/percpu-defs.h:317:2: error: passing argument 1 of 'load_mm_ldt_if_present' makes pointer from integer without a cast
@ 2020-12-04 23:49 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-12-04 23:49 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6798 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git x86/mm
head:   e69827244c2f1e534aa83a40334ffa00bafe54c2
commit: f11196dfb449b51be4cf583fa343b90e20f95d48 [1/7] x86/ldt: Refactor the LDT loading functions
config: i386-randconfig-a006-20201204 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?id=f11196dfb449b51be4cf583fa343b90e20f95d48
        git remote add luto https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git
        git fetch --no-tags luto x86/mm
        git checkout f11196dfb449b51be4cf583fa343b90e20f95d48
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

All errors (new ones prefixed by >>):

   In file included from include/asm-generic/percpu.h:7,
                    from arch/x86/include/asm/percpu.h:390,
                    from arch/x86/include/asm/preempt.h:6,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from arch/x86/include/asm/mmu.h:5,
                    from arch/x86/include/asm/desc.h:7,
                    from arch/x86/include/asm/mmu_context.h:5,
                    from include/linux/mmu_context.h:5,
                    from drivers/gpu/drm/i915/gem/i915_gem_userptr.c:7:
   arch/x86/include/asm/mmu_context.h: In function 'load_ldt_if_present':
   arch/x86/include/asm/mmu_context.h:95:46: error: 'cpu_tlbstate' undeclared (first use in this function)
      95 |  return load_mm_ldt_if_present(this_cpu_read(cpu_tlbstate.loaded_mm));
         |                                              ^~~~~~~~~~~~
   include/linux/percpu-defs.h:318:9: note: in definition of macro '__pcpu_size_call_return'
     318 |  typeof(variable) pscr_ret__;     \
         |         ^~~~~~~~
   arch/x86/include/asm/mmu_context.h:95:32: note: in expansion of macro 'this_cpu_read'
      95 |  return load_mm_ldt_if_present(this_cpu_read(cpu_tlbstate.loaded_mm));
         |                                ^~~~~~~~~~~~~
   arch/x86/include/asm/mmu_context.h:95:46: note: each undeclared identifier is reported only once for each function it appears in
      95 |  return load_mm_ldt_if_present(this_cpu_read(cpu_tlbstate.loaded_mm));
         |                                              ^~~~~~~~~~~~
   include/linux/percpu-defs.h:318:9: note: in definition of macro '__pcpu_size_call_return'
     318 |  typeof(variable) pscr_ret__;     \
         |         ^~~~~~~~
   arch/x86/include/asm/mmu_context.h:95:32: note: in expansion of macro 'this_cpu_read'
      95 |  return load_mm_ldt_if_present(this_cpu_read(cpu_tlbstate.loaded_mm));
         |                                ^~~~~~~~~~~~~
>> include/linux/percpu-defs.h:317:2: error: passing argument 1 of 'load_mm_ldt_if_present' makes pointer from integer without a cast [-Werror=int-conversion]
     317 | ({         \
         | ~^~~~~~~~~~~
         |  |
         |  int
     318 |  typeof(variable) pscr_ret__;     \
         |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     319 |  __verify_pcpu_ptr(&(variable));     \
         |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     320 |  switch(sizeof(variable)) {     \
         |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     321 |  case 1: pscr_ret__ = stem##1(variable); break;   \
         |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     322 |  case 2: pscr_ret__ = stem##2(variable); break;   \
         |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     323 |  case 4: pscr_ret__ = stem##4(variable); break;   \
         |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     324 |  case 8: pscr_ret__ = stem##8(variable); break;   \
         |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     325 |  default:       \
         |  ~~~~~~~~~~~~~~~~
     326 |   __bad_size_call_parameter(); break;   \
         |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     327 |  }        \
         |  ~~~~~~~~~~
     328 |  pscr_ret__;       \
         |  ~~~~~~~~~~~~~~~~~~~
     329 | })
         | ~~
   include/linux/percpu-defs.h:507:29: note: in expansion of macro '__pcpu_size_call_return'
     507 | #define this_cpu_read(pcp)  __pcpu_size_call_return(this_cpu_read_, pcp)
         |                             ^~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/mmu_context.h:95:32: note: in expansion of macro 'this_cpu_read'
      95 |  return load_mm_ldt_if_present(this_cpu_read(cpu_tlbstate.loaded_mm));
         |                                ^~~~~~~~~~~~~
   In file included from include/linux/mmu_context.h:5,
                    from drivers/gpu/drm/i915/gem/i915_gem_userptr.c:7:
   arch/x86/include/asm/mmu_context.h:83:61: note: expected 'struct mm_struct *' but argument is of type 'int'
      83 | static inline bool load_mm_ldt_if_present(struct mm_struct *mm)
         |                                           ~~~~~~~~~~~~~~~~~~^~
   cc1: all warnings being treated as errors

vim +/load_mm_ldt_if_present +317 include/linux/percpu-defs.h

a32f8d8eda8bd4 Tejun Heo 2014-06-17  315  
a32f8d8eda8bd4 Tejun Heo 2014-06-17  316  #define __pcpu_size_call_return(stem, variable)				\
eba117889ac444 Tejun Heo 2014-06-17 @317  ({									\
eba117889ac444 Tejun Heo 2014-06-17  318  	typeof(variable) pscr_ret__;					\
a32f8d8eda8bd4 Tejun Heo 2014-06-17  319  	__verify_pcpu_ptr(&(variable));					\
a32f8d8eda8bd4 Tejun Heo 2014-06-17  320  	switch(sizeof(variable)) {					\
a32f8d8eda8bd4 Tejun Heo 2014-06-17  321  	case 1: pscr_ret__ = stem##1(variable); break;			\
a32f8d8eda8bd4 Tejun Heo 2014-06-17  322  	case 2: pscr_ret__ = stem##2(variable); break;			\
a32f8d8eda8bd4 Tejun Heo 2014-06-17  323  	case 4: pscr_ret__ = stem##4(variable); break;			\
a32f8d8eda8bd4 Tejun Heo 2014-06-17  324  	case 8: pscr_ret__ = stem##8(variable); break;			\
a32f8d8eda8bd4 Tejun Heo 2014-06-17  325  	default:							\
a32f8d8eda8bd4 Tejun Heo 2014-06-17  326  		__bad_size_call_parameter(); break;			\
a32f8d8eda8bd4 Tejun Heo 2014-06-17  327  	}								\
a32f8d8eda8bd4 Tejun Heo 2014-06-17  328  	pscr_ret__;							\
a32f8d8eda8bd4 Tejun Heo 2014-06-17  329  })
a32f8d8eda8bd4 Tejun Heo 2014-06-17  330  

:::::: The code at line 317 was first introduced by commit
:::::: eba117889ac444bea6e8270049cbaeed48169889 percpu: preffity percpu header files

:::::: TO: Tejun Heo <tj@kernel.org>
:::::: CC: Tejun Heo <tj@kernel.org>

---
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: 32727 bytes --]

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

only message in thread, other threads:[~2020-12-04 23:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-04 23:49 [luto:x86/mm 1/7] include/linux/percpu-defs.h:317:2: error: passing argument 1 of 'load_mm_ldt_if_present' makes pointer from integer without a cast kernel 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.