mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* arch/powerpc/include/asm/page.h:230:9: warning: result of comparison of constant 13835058055282163712 with expression of type 'unsigned long' is always true
@ 2023-11-06 11:51 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-11-06 11:51 UTC (permalink / raw)
  To: Linus Walleij; +Cc: llvm, oe-kbuild-all, linux-kernel, Michael Ellerman

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d2f51b3516dade79269ff45eae2a7668ae711b25
commit: 58b6fed89ab0f602de0d143c617c29c3d4c67429 powerpc: Make virt_to_pfn() a static inline
date:   3 months ago
config: powerpc64-allyesconfig (https://download.01.org/0day-ci/archive/20231106/202311061940.4pBrm44u-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231106/202311061940.4pBrm44u-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311061940.4pBrm44u-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:137:
   In file included from arch/powerpc/include/asm/vdso/gettimeofday.h:7:
>> arch/powerpc/include/asm/page.h:230:9: warning: result of comparison of constant 13835058055282163712 with expression of type 'unsigned long' is always true [-Wtautological-constant-out-of-range-compare]
     230 |         return __pa(kaddr) >> PAGE_SHIFT;
         |                ^~~~~~~~~~~
   arch/powerpc/include/asm/page.h:217:37: note: expanded from macro '__pa'
     217 |         VIRTUAL_WARN_ON((unsigned long)(x) < PAGE_OFFSET);              \
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
   arch/powerpc/include/asm/page.h:202:73: note: expanded from macro 'VIRTUAL_WARN_ON'
     202 | #define VIRTUAL_WARN_ON(x)      WARN_ON(IS_ENABLED(CONFIG_DEBUG_VIRTUAL) && (x))
         |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   arch/powerpc/include/asm/bug.h:88:25: note: expanded from macro 'WARN_ON'
      88 |         int __ret_warn_on = !!(x);                              \
         |                                ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:137:
   In file included from arch/powerpc/include/asm/vdso/gettimeofday.h:7:
>> arch/powerpc/include/asm/page.h:235:9: warning: result of comparison of constant 13835058055282163712 with expression of type 'unsigned long' is always false [-Wtautological-constant-out-of-range-compare]
     235 |         return __va(pfn << PAGE_SHIFT);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/page.h:211:37: note: expanded from macro '__va'
     211 |         VIRTUAL_WARN_ON((unsigned long)(x) >= PAGE_OFFSET);             \
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
   arch/powerpc/include/asm/page.h:202:73: note: expanded from macro 'VIRTUAL_WARN_ON'
     202 | #define VIRTUAL_WARN_ON(x)      WARN_ON(IS_ENABLED(CONFIG_DEBUG_VIRTUAL) && (x))
         |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   arch/powerpc/include/asm/bug.h:88:25: note: expanded from macro 'WARN_ON'
      88 |         int __ret_warn_on = !!(x);                              \
         |                                ^
   2 warnings generated.
--
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:137:
   In file included from arch/powerpc/include/asm/vdso/gettimeofday.h:7:
>> arch/powerpc/include/asm/page.h:230:9: warning: result of comparison of constant 13835058055282163712 with expression of type 'unsigned long' is always true [-Wtautological-constant-out-of-range-compare]
     230 |         return __pa(kaddr) >> PAGE_SHIFT;
         |                ^~~~~~~~~~~
   arch/powerpc/include/asm/page.h:217:37: note: expanded from macro '__pa'
     217 |         VIRTUAL_WARN_ON((unsigned long)(x) < PAGE_OFFSET);              \
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
   arch/powerpc/include/asm/page.h:202:73: note: expanded from macro 'VIRTUAL_WARN_ON'
     202 | #define VIRTUAL_WARN_ON(x)      WARN_ON(IS_ENABLED(CONFIG_DEBUG_VIRTUAL) && (x))
         |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   arch/powerpc/include/asm/bug.h:88:25: note: expanded from macro 'WARN_ON'
      88 |         int __ret_warn_on = !!(x);                              \
         |                                ^
   In file included from <built-in>:4:
   In file included from lib/vdso/gettimeofday.c:5:
   In file included from include/vdso/datapage.h:137:
   In file included from arch/powerpc/include/asm/vdso/gettimeofday.h:7:
>> arch/powerpc/include/asm/page.h:235:9: warning: result of comparison of constant 13835058055282163712 with expression of type 'unsigned long' is always false [-Wtautological-constant-out-of-range-compare]
     235 |         return __va(pfn << PAGE_SHIFT);
         |                ^~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/page.h:211:37: note: expanded from macro '__va'
     211 |         VIRTUAL_WARN_ON((unsigned long)(x) >= PAGE_OFFSET);             \
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
   arch/powerpc/include/asm/page.h:202:73: note: expanded from macro 'VIRTUAL_WARN_ON'
     202 | #define VIRTUAL_WARN_ON(x)      WARN_ON(IS_ENABLED(CONFIG_DEBUG_VIRTUAL) && (x))
         |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   arch/powerpc/include/asm/bug.h:88:25: note: expanded from macro 'WARN_ON'
      88 |         int __ret_warn_on = !!(x);                              \
         |                                ^
   2 warnings generated.


vim +230 arch/powerpc/include/asm/page.h

   226	
   227	#ifndef __ASSEMBLY__
   228	static inline unsigned long virt_to_pfn(const void *kaddr)
   229	{
 > 230		return __pa(kaddr) >> PAGE_SHIFT;
   231	}
   232	
   233	static inline const void *pfn_to_kaddr(unsigned long pfn)
   234	{
 > 235		return __va(pfn << PAGE_SHIFT);
   236	}
   237	#endif
   238	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

only message in thread, other threads:[~2023-11-06 11:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-06 11:51 arch/powerpc/include/asm/page.h:230:9: warning: result of comparison of constant 13835058055282163712 with expression of type 'unsigned long' is always true 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

all inboxes | Powered by JetHome®