[mmotm:master 319/343] arch/powerpc//mm/mem.c:112:11: error: conflicting types for 'arch_add_memory'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://git.cmpxchg.org/linux-mmotm.git master
head:   26d15497ee742346602a5bb90a1329a63b1e3f32
commit: 616dd44818e37e37561f4b59071de790d530c373 [319/343] linux-next-rejects
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 616dd44818e37e37561f4b59071de790d530c373
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>


All errors (new ones prefixed by >>):

>> arch/powerpc//mm/mem.c:112:11: error: conflicting types for 'arch_add_memory'
    int __ref arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap,
              ^~~~~~~~~~~~~~~
   In file included from include/linux/mmzone.h:802:0,
                    from include/linux/gfp.h:6,
                    from arch/powerpc//mm/mem.c:25:
   include/linux/memory_hotplug.h:114:12: note: previous declaration of 'arch_add_memory' was here
    extern int arch_add_memory(int nid, u64 start, u64 size,
               ^~~~~~~~~~~~~~~
>> arch/powerpc//mm/mem.c:135:11: error: conflicting types for 'arch_remove_memory'
    int __ref arch_remove_memory(int nid, u64 start, u64 size,
              ^~~~~~~~~~~~~~~~~~
   In file included from include/linux/mmzone.h:802:0,
                    from include/linux/gfp.h:6,
                    from arch/powerpc//mm/mem.c:25:
   include/linux/memory_hotplug.h:127:13: note: previous declaration of 'arch_remove_memory' was here
    extern void arch_remove_memory(int nid, u64 start, u64 size,
                ^~~~~~~~~~~~~~~~~~
   arch/powerpc//mm/mem.c: In function 'arch_remove_memory':
   arch/powerpc//mm/mem.c:165:1: error: control reaches end of non-void function [-Werror=return-type]
    }
    ^
   cc1: all warnings being treated as errors
--
   arch/powerpc//mm/mmu_context_iommu.c: In function 'mm_iommu_do_alloc':
>> arch/powerpc//mm/mmu_context_iommu.c:140:9: error: implicit declaration of function 'get_user_pages_longterm'; did you mean 'get_user_pages_locked'? [-Werror=implicit-function-declaration]
      ret = get_user_pages_longterm(ua + (entry << PAGE_SHIFT), n,
            ^~~~~~~~~~~~~~~~~~~~~~~
            get_user_pages_locked
   cc1: all warnings being treated as errors

vim +/arch_add_memory +112 arch/powerpc//mm/mem.c

   111	
 > 112	int __ref arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap,
   113				struct mhp_restrictions *restrictions)
   114	{
   115		unsigned long start_pfn = start >> PAGE_SHIFT;
   116		unsigned long nr_pages = size >> PAGE_SHIFT;
   117		int rc;
   118	
   119		if (resize_hpt_for_hotplug(memblock_phys_mem_size()) == -ENOSPC)
   120			pr_warn("Hash collision while resizing HPT\n");
   121	
   122		start = (unsigned long)__va(start);
   123		rc = create_section_mapping(start, start + size, nid);
   124		if (rc) {
   125			pr_warn("Unable to create mapping for hot added memory 0x%llx..0x%llx: %d\n",
   126				start, start + size, rc);
   127			return -EFAULT;
   128		}
   129		flush_inval_dcache_range(start, start + size);
   130	
   131		return __add_pages(nid, start_pfn, nr_pages, restrictions);
   132	}
   133	
   134	#ifdef CONFIG_MEMORY_HOTREMOVE
 > 135	int __ref arch_remove_memory(int nid, u64 start, u64 size,
   136				     struct vmem_altmap *altmap)
   137	{
   138		unsigned long start_pfn = start >> PAGE_SHIFT;
   139		unsigned long nr_pages = size >> PAGE_SHIFT;
   140		struct page *page;
   141		int ret;
   142	
   143		/*
   144		 * If we have an altmap then we need to skip over any reserved PFNs
   145		 * when querying the zone.
   146		 */
   147		page = pfn_to_page(start_pfn);
   148		if (altmap)
   149			page += vmem_altmap_offset(altmap);
   150	
   151		__remove_pages(page_zone(page), start_pfn, nr_pages, altmap);
   152	
   153		/* Remove htab bolted mappings for this section of memory */
   154		start = (unsigned long)__va(start);
   155		flush_inval_dcache_range(start, start + size);
   156		ret = remove_section_mapping(start, start + size);
   157		WARN_ON_ONCE(ret);
   158	
   159		/* Ensure all vmalloc mappings are flushed in case they also
   160		 * hit that section of memory
   161		 */
   162		vm_unmap_aliases();
   163	
   164		resize_hpt_for_hotplug(memblock_phys_mem_size());
   165	}
   166	#endif
   167	#endif /* CONFIG_MEMORY_HOTPLUG */
   168	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux