public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Jonathan Cameron <jonathan.cameron@huawei.com>
Subject: [jic23-cxl-staging:arm-numa-fixes 5/11] arch/arm64/mm/init.c:63:5: error: redefinition of 'memory_add_physaddr_to_nid'
Date: Thu, 16 May 2024 01:16:09 +0800	[thread overview]
Message-ID: <202405160106.sIy16AlA-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/cxl-staging.git arm-numa-fixes
head:   d077bf9570e8024f6d670d5662b62778715084fc
commit: c17c987d979cab4f0118c1d025fd0c7e096c77f1 [5/11] arm64: numa: Introduce a memory_add_physaddr_to_nid()
config: arm64-randconfig-002-20240515 (https://download.01.org/0day-ci/archive/20240516/202405160106.sIy16AlA-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project d3455f4ddd16811401fa153298fadd2f59f6914e)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240516/202405160106.sIy16AlA-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/202405160106.sIy16AlA-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/arm64/mm/init.c:12:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:21:
   In file included from include/linux/mm.h:2210:
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> arch/arm64/mm/init.c:63:5: error: redefinition of 'memory_add_physaddr_to_nid'
      63 | int memory_add_physaddr_to_nid(u64 start)
         |     ^
   arch/arm64/include/asm/sparsemem.h:31:36: note: expanded from macro 'memory_add_physaddr_to_nid'
      31 | #define memory_add_physaddr_to_nid memory_add_physaddr_to_nid
         |                                    ^
   include/linux/numa.h:47:19: note: previous definition is here
      47 | static inline int memory_add_physaddr_to_nid(u64 start)
         |                   ^
   1 warning and 1 error generated.


vim +/memory_add_physaddr_to_nid +63 arch/arm64/mm/init.c

  > 12	#include <linux/swap.h>
    13	#include <linux/init.h>
    14	#include <linux/cache.h>
    15	#include <linux/mman.h>
    16	#include <linux/nodemask.h>
    17	#include <linux/initrd.h>
    18	#include <linux/gfp.h>
    19	#include <linux/math.h>
    20	#include <linux/memblock.h>
    21	#include <linux/sort.h>
    22	#include <linux/of.h>
    23	#include <linux/of_fdt.h>
    24	#include <linux/dma-direct.h>
    25	#include <linux/dma-map-ops.h>
    26	#include <linux/efi.h>
    27	#include <linux/swiotlb.h>
    28	#include <linux/vmalloc.h>
    29	#include <linux/mm.h>
    30	#include <linux/kexec.h>
    31	#include <linux/crash_dump.h>
    32	#include <linux/hugetlb.h>
    33	#include <linux/acpi_iort.h>
    34	#include <linux/kmemleak.h>
    35	
    36	#include <asm/boot.h>
    37	#include <asm/fixmap.h>
    38	#include <asm/kasan.h>
    39	#include <asm/kernel-pgtable.h>
    40	#include <asm/kvm_host.h>
    41	#include <asm/memory.h>
    42	#include <asm/numa.h>
    43	#include <asm/sections.h>
    44	#include <asm/setup.h>
    45	#include <linux/sizes.h>
    46	#include <asm/tlb.h>
    47	#include <asm/alternative.h>
    48	#include <asm/xen/swiotlb-xen.h>
    49	
    50	static int __memory_add_physaddr_to_nid(u64 addr)
    51	{
    52		unsigned long start_pfn, end_pfn, pfn = PHYS_PFN(addr);
    53		int nid;
    54	
    55		for_each_online_node(nid) {
    56			get_pfn_range_for_nid(nid, &start_pfn, &end_pfn);
    57			if (pfn >= start_pfn && pfn <= end_pfn)
    58				return nid;
    59		}
    60		return NUMA_NO_NODE;
    61	}
    62	
  > 63	int memory_add_physaddr_to_nid(u64 start)
    64	{
    65		int nid = __memory_add_physaddr_to_nid(start);
    66	
    67		/* Default to node0 as not all callers are prepared for this to fail */
    68		if (nid == NUMA_NO_NODE)
    69			return 0;
    70	
    71		return nid;
    72	}
    73	EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid);
    74	

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

                 reply	other threads:[~2024-05-15 17:16 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=202405160106.sIy16AlA-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=jonathan.cameron@huawei.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