Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev, llvm@lists.linux.dev
Subject: arch/x86/kernel/dumpstack_64.c:80:2: warning: arithmetic between different enumeration types ('enum stack_type' and 'enum exception_stack_ordering')
Date: Fri, 20 Dec 2024 09:11:38 +0800	[thread overview]
Message-ID: <202412200930.m4QinYWG-lkp@intel.com> (raw)

CC: linux-kernel@vger.kernel.org
TO: Thomas Gleixner <tglx@linutronix.de>
CC: Borislav Petkov <bp@suse.de>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8faabc041a001140564f718dabe37753e88b37fa
commit: c450c8f532b63475b30e29bc600c25ab0a4ab282 x86/dumpstack/64: Speedup in_exception_stack()
date:   6 years ago
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20241220/202412200930.m4QinYWG-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241220/202412200930.m4QinYWG-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/202412200930.m4QinYWG-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> arch/x86/kernel/dumpstack_64.c:80:2: warning: arithmetic between different enumeration types ('enum stack_type' and 'enum exception_stack_ordering') [-Wenum-enum-conversion]
      80 |         EPAGERANGE(DF),
         |         ^~~~~~~~~~~~~~
   arch/x86/kernel/dumpstack_64.c:70:32: note: expanded from macro 'EPAGERANGE'
      70 |                 .type   = STACK_TYPE_EXCEPTION + ESTACK_ ##st, }
         |                           ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
   arch/x86/kernel/dumpstack_64.c:81:2: warning: arithmetic between different enumeration types ('enum stack_type' and 'enum exception_stack_ordering') [-Wenum-enum-conversion]
      81 |         EPAGERANGE(NMI),
         |         ^~~~~~~~~~~~~~~
   arch/x86/kernel/dumpstack_64.c:70:32: note: expanded from macro 'EPAGERANGE'
      70 |                 .type   = STACK_TYPE_EXCEPTION + ESTACK_ ##st, }
         |                           ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
   arch/x86/kernel/dumpstack_64.c:82:2: warning: arithmetic between different enumeration types ('enum stack_type' and 'enum exception_stack_ordering') [-Wenum-enum-conversion]
      82 |         EPAGERANGE(DB1),
         |         ^~~~~~~~~~~~~~~
   arch/x86/kernel/dumpstack_64.c:70:32: note: expanded from macro 'EPAGERANGE'
      70 |                 .type   = STACK_TYPE_EXCEPTION + ESTACK_ ##st, }
         |                           ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
   arch/x86/kernel/dumpstack_64.c:83:2: warning: arithmetic between different enumeration types ('enum stack_type' and 'enum exception_stack_ordering') [-Wenum-enum-conversion]
      83 |         EPAGERANGE(DB),
         |         ^~~~~~~~~~~~~~
   arch/x86/kernel/dumpstack_64.c:70:32: note: expanded from macro 'EPAGERANGE'
      70 |                 .type   = STACK_TYPE_EXCEPTION + ESTACK_ ##st, }
         |                           ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
   arch/x86/kernel/dumpstack_64.c:84:2: warning: arithmetic between different enumeration types ('enum stack_type' and 'enum exception_stack_ordering') [-Wenum-enum-conversion]
      84 |         EPAGERANGE(MCE),
         |         ^~~~~~~~~~~~~~~
   arch/x86/kernel/dumpstack_64.c:70:32: note: expanded from macro 'EPAGERANGE'
      70 |                 .type   = STACK_TYPE_EXCEPTION + ESTACK_ ##st, }
         |                           ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
   5 warnings generated.


vim +80 arch/x86/kernel/dumpstack_64.c

    64	
    65	#define EPAGERANGE(st)							\
    66		[PFN_DOWN(CEA_ESTACK_OFFS(st)) ...				\
    67		 PFN_DOWN(CEA_ESTACK_OFFS(st) + CEA_ESTACK_SIZE(st) - 1)] = {	\
    68			.offs	= CEA_ESTACK_OFFS(st),				\
    69			.size	= CEA_ESTACK_SIZE(st),				\
    70			.type	= STACK_TYPE_EXCEPTION + ESTACK_ ##st, }
    71	
    72	/*
    73	 * Array of exception stack page descriptors. If the stack is larger than
    74	 * PAGE_SIZE, all pages covering a particular stack will have the same
    75	 * info. The guard pages including the not mapped DB2 stack are zeroed
    76	 * out.
    77	 */
    78	static const
    79	struct estack_pages estack_pages[CEA_ESTACK_PAGES] ____cacheline_aligned = {
  > 80		EPAGERANGE(DF),
    81		EPAGERANGE(NMI),
    82		EPAGERANGE(DB1),
    83		EPAGERANGE(DB),
    84		EPAGERANGE(MCE),
    85	};
    86	

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

             reply	other threads:[~2024-12-20  1:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-20  1:11 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-28  8:30 arch/x86/kernel/dumpstack_64.c:80:2: warning: arithmetic between different enumeration types ('enum stack_type' and 'enum exception_stack_ordering') kernel test robot

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=202412200930.m4QinYWG-lkp@intel.com \
    --to=lkp@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox