linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Em Sharnoff <sharnoff@neon.tech>,
	linux-kernel@vger.kernel.org, x86@kernel.org, linux-mm@kvack.org
Cc: oe-kbuild-all@lists.linux.dev, Ingo Molnar <mingo@kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>,
	"Edgecombe, Rick P" <rick.p.edgecombe@intel.com>,
	Oleg Vasilev <oleg@neon.tech>,
	Arthur Petukhovsky <arthur@neon.tech>,
	Stefan Radig <stefan@neon.tech>, Misha Sakhnov <misha@neon.tech>
Subject: Re: [PATCH v2 1/2] x86/mm: Handle alloc failure in phys_*_init()
Date: Tue, 10 Jun 2025 01:56:40 +0800	[thread overview]
Message-ID: <202506100135.4iTfYLoH-lkp@intel.com> (raw)
In-Reply-To: <25c5e747-107f-4450-8eb0-11b2f0dab14d@neon.tech>

Hi Em,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 82f2b0b97b36ee3fcddf0f0780a9a0825d52fec3]

url:    https://github.com/intel-lab-lkp/linux/commits/Em-Sharnoff/x86-mm-Handle-alloc-failure-in-phys_-_init/20250609-183537
base:   82f2b0b97b36ee3fcddf0f0780a9a0825d52fec3
patch link:    https://lore.kernel.org/r/25c5e747-107f-4450-8eb0-11b2f0dab14d%40neon.tech
patch subject: [PATCH v2 1/2] x86/mm: Handle alloc failure in phys_*_init()
config: i386-buildonly-randconfig-006-20250609 (https://download.01.org/0day-ci/archive/20250610/202506100135.4iTfYLoH-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250610/202506100135.4iTfYLoH-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/202506100135.4iTfYLoH-lkp@intel.com/

All warnings (new ones prefixed by >>):

   arch/x86/mm/init.c: In function 'init_memory_mapping':
>> arch/x86/mm/init.c:555:28: warning: passing argument 1 of 'IS_ERR' makes pointer from integer without a cast [-Wint-conversion]
     555 |                 if (IS_ERR(ret))
         |                            ^~~
         |                            |
         |                            long unsigned int
   In file included from include/linux/string.h:11,
                    from arch/x86/include/asm/page_32.h:18,
                    from arch/x86/include/asm/page.h:14,
                    from arch/x86/include/asm/thread_info.h:12,
                    from include/linux/thread_info.h:60,
                    from include/linux/spinlock.h:60,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:7,
                    from arch/x86/mm/init.c:1:
   include/linux/err.h:68:60: note: expected 'const void *' but argument is of type 'long unsigned int'
      68 | static inline bool __must_check IS_ERR(__force const void *ptr)
         |                                                ~~~~~~~~~~~~^~~


vim +/IS_ERR +555 arch/x86/mm/init.c

   531	
   532	/*
   533	 * Setup the direct mapping of the physical memory at PAGE_OFFSET.
   534	 * This runs before bootmem is initialized and gets pages directly from
   535	 * the physical memory. To access them they are temporarily mapped.
   536	 * Allocation errors are returned with ERR_PTR.
   537	 */
   538	unsigned long __ref init_memory_mapping(unsigned long start,
   539						unsigned long end, pgprot_t prot)
   540	{
   541		struct map_range mr[NR_RANGE_MR];
   542		unsigned long ret = 0;
   543		int nr_range, i;
   544	
   545		pr_debug("init_memory_mapping: [mem %#010lx-%#010lx]\n",
   546		       start, end - 1);
   547	
   548		memset(mr, 0, sizeof(mr));
   549		nr_range = split_mem_range(mr, 0, start, end);
   550	
   551		for (i = 0; i < nr_range; i++) {
   552			ret = kernel_physical_mapping_init(mr[i].start, mr[i].end,
   553							   mr[i].page_size_mask,
   554							   prot);
 > 555			if (IS_ERR(ret))
   556				return ret;
   557		}
   558	
   559		add_pfn_range_mapped(start >> PAGE_SHIFT, ret >> PAGE_SHIFT);
   560	
   561		return ret >> PAGE_SHIFT;
   562	}
   563	

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


  parent reply	other threads:[~2025-06-09 17:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-09 10:32 [PATCH v2 0/2] x86/mm: Improve alloc handling of phys_*_init() Em Sharnoff
2025-06-09 10:33 ` [PATCH v2 1/2] x86/mm: Handle alloc failure in phys_*_init() Em Sharnoff
2025-06-09 17:15   ` kernel test robot
2025-06-10 10:19     ` Em Sharnoff
2025-06-09 17:56   ` kernel test robot [this message]
2025-06-09 10:34 ` [PATCH v2 2/2] x86/mm: Use GFP_KERNEL for alloc_low_pages() after boot Em Sharnoff

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=202506100135.4iTfYLoH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arthur@neon.tech \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=misha@neon.tech \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oleg@neon.tech \
    --cc=peterz@infradead.org \
    --cc=rick.p.edgecombe@intel.com \
    --cc=sharnoff@neon.tech \
    --cc=stefan@neon.tech \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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