Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [daveh-devel:kss 24/32] arch/x86/mm/cpu_entry_area.c:97:66: warning: format specifies type 'unsigned long' but the argument has type 'pgprotval_t' (aka 'unsigned long long')
@ 2026-10-18 19:28 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-18 19:28 UTC (permalink / raw)
  To: Dave Hansen; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/daveh/devel.git kss
head:   1b2e2aefa6c7e3d15fac1b25a971b2d2cc3b697d
commit: 2c3b2196343ffa5e0389c9a104fe9c00e0875799 [24/32] cea-estacks-shadows-debug1
config: i386-buildonly-randconfig-1001-20261018 (https://download.01.org/0day-ci/archive/20261019/202610190249.H5DsgiUd-lkp@intel.com/config)
compiler: clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261019/202610190249.H5DsgiUd-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/202610190249.H5DsgiUd-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> arch/x86/mm/cpu_entry_area.c:97:66: warning: format specifies type 'unsigned long' but the argument has type 'pgprotval_t' (aka 'unsigned long long') [-Wformat]
      97 |         printk("%s(0x%016lx, 0x%016llx, 0x%016lx)\n", __func__, va, pa, pgprot_val(flags));
         |                                           ~~~~~~                        ^~~~~~~~~~~~~~~~~
         |                                           %016llx
   include/linux/printk.h:511:60: note: expanded from macro 'printk'
     511 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                     ~~~    ^~~~~~~~~~~
   include/linux/printk.h:483:19: note: expanded from macro 'printk_index_wrap'
     483 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^~~~~~~~~~~
   arch/x86/include/asm/pgtable_types.h:201:24: note: expanded from macro 'pgprot_val'
     201 | #define pgprot_val(x)           ((x).pgprot)
         |                                 ^~~~~~~~~~~~
   arch/x86/mm/cpu_entry_area.c:103:114: warning: format specifies type 'unsigned long' but the argument has type 'pgprotval_t' (aka 'unsigned long long') [-Wformat]
     103 |         printk("%s(0x%016lx, 0x%016lx, %d, 0x%016lx)\n", __func__, (unsigned long)cea_vaddr, (unsigned long)ptr, pages, pgprot_val(prot));
         |                                              ~~~~~~                                                                     ^~~~~~~~~~~~~~~~
         |                                              %016llx
   include/linux/printk.h:511:60: note: expanded from macro 'printk'
     511 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                     ~~~    ^~~~~~~~~~~
   include/linux/printk.h:483:19: note: expanded from macro 'printk_index_wrap'
     483 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^~~~~~~~~~~
   arch/x86/include/asm/pgtable_types.h:201:24: note: expanded from macro 'pgprot_val'
     201 | #define pgprot_val(x)           ((x).pgprot)
         |                                 ^~~~~~~~~~~~
   2 warnings generated.


vim +97 arch/x86/mm/cpu_entry_area.c

    78	
    79	void cea_set_pte(void *cea_vaddr, phys_addr_t pa, pgprot_t flags)
    80	{
    81		unsigned long va = (unsigned long) cea_vaddr;
    82		pte_t pte = pfn_pte(pa >> PAGE_SHIFT, flags);
    83	
    84		/*
    85		 * The cpu_entry_area is shared between the user and kernel
    86		 * page tables.  All of its ptes can safely be global.
    87		 * _PAGE_GLOBAL gets reused to help indicate PROT_NONE for
    88		 * non-present PTEs, so be careful not to set it in that
    89		 * case to avoid confusion.
    90		 */
    91		if (boot_cpu_has(X86_FEATURE_PGE) &&
    92		    (pgprot_val(flags) & _PAGE_PRESENT))
    93			pte = pte_set_flags(pte, _PAGE_GLOBAL);
    94	
    95		set_pte_vaddr(va, pte);
    96	
  > 97		printk("%s(0x%016lx, 0x%016llx, 0x%016lx)\n", __func__, va, pa, pgprot_val(flags));
    98	}
    99	

--
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:[~2026-10-18 19:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-18 19:28 [daveh-devel:kss 24/32] arch/x86/mm/cpu_entry_area.c:97:66: warning: format specifies type 'unsigned long' but the argument has type 'pgprotval_t' (aka 'unsigned long long') 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