All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dave Hansen <dave.hansen@linux.intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [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')
Date: Mon, 19 Oct 2026 03:28:16 +0800	[thread overview]
Message-ID: <202610190249.H5DsgiUd-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-10-18 19:28 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=202610190249.H5DsgiUd-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.