All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Huacai Chen <chenhuacai@loongson.cn>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [chenhuacai-loongson:loongarch-next 9/22] arch/loongarch/include/asm/numa.h:17:48: warning: left shift count >= width of type
Date: Sat, 24 Oct 2026 08:03:32 +0800	[thread overview]
Message-ID: <202610240732.2HGud7k8-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git loongarch-next
head:   ce668200313df40f8c74752b9601a3a85def24f5
commit: 9c04d06741cd87a9e18cafff1cfeff8c5ff6727a [9/22] LoongArch: Use pa_to_nid()/nid_to_addrbase() rather than hard-code
config: loongarch-randconfig-1001-20261023 (https://download.01.org/0day-ci/archive/20261024/202610240732.2HGud7k8-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 16.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261024/202610240732.2HGud7k8-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/202610240732.2HGud7k8-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from arch/loongarch/pci/pci.c:15:
   arch/loongarch/pci/pci.c: In function 'mcfg_addr_init':
>> arch/loongarch/include/asm/numa.h:17:48: warning: left shift count >= width of type [-Wshift-count-overflow]
      17 | #define nid_to_addrbase(nid)    (_ULCAST_(nid) << NODE_ADDRSPACE_SHIFT)
         |                                                ^~
   arch/loongarch/pci/pci.c:47:17: note: in expansion of macro 'nid_to_addrbase'
      47 |         return (nid_to_addrbase(node) | MCFG_EXT_PCICFG_BASE);
         |                 ^~~~~~~~~~~~~~~
>> arch/loongarch/pci/pci.c:47:39: warning: conversion from 'long long unsigned int' to 'phys_addr_t' {aka 'unsigned int'} changes value from '16484084482048' to '0' [-Woverflow]
      47 |         return (nid_to_addrbase(node) | MCFG_EXT_PCICFG_BASE);
         |                ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~


vim +17 arch/loongarch/include/asm/numa.h

d4b6f1562a3c32 Huacai Chen 2022-05-31  15  
d4b6f1562a3c32 Huacai Chen 2022-05-31  16  #define pa_to_nid(addr)		(((addr) & 0xf00000000000) >> NODE_ADDRSPACE_SHIFT)
d4b6f1562a3c32 Huacai Chen 2022-05-31 @17  #define nid_to_addrbase(nid)	(_ULCAST_(nid) << NODE_ADDRSPACE_SHIFT)
d4b6f1562a3c32 Huacai Chen 2022-05-31  18  

:::::: The code at line 17 was first introduced by commit
:::::: d4b6f1562a3c3284adcef81d6e4f183d7d34b8a9 LoongArch: Add Non-Uniform Memory Access (NUMA) support

:::::: TO: Huacai Chen <chenhuacai@loongson.cn>
:::::: CC: Huacai Chen <chenhuacai@loongson.cn>

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

                 reply	other threads:[~2026-10-24  0:04 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=202610240732.2HGud7k8-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=chenhuacai@loongson.cn \
    --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.