All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org, Yin Tirui <yintirui@huawei.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:OLK-6.6 3214/3214] mm/memory.c:2802:5: sparse: sparse: symbol '__remap_pfn_range' was not declared. Should it be static?
Date: Wed, 19 Nov 2025 00:46:18 +0800	[thread overview]
Message-ID: <202511190025.obom3fen-lkp@intel.com> (raw)

tree:   https://gitee.com/openeuler/kernel.git OLK-6.6
head:   b4a3c05741e1650e8bb8399196fb5d7a318a4698
commit: 923e224a12462d640fa37f3069c6bfafd378ac3b [3214/3214] mm: introduce remap_pfn_range_try_pmd() for PMD-level hugepage mapping
config: x86_64-randconfig-r111-20251118 (https://download.01.org/0day-ci/archive/20251119/202511190025.obom3fen-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251119/202511190025.obom3fen-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/202511190025.obom3fen-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> mm/memory.c:2802:5: sparse: sparse: symbol '__remap_pfn_range' was not declared. Should it be static?
   mm/memory.c:301:9: sparse: sparse: incompatible types in conditional expression (different base types):
   mm/memory.c:301:9: sparse:    void
   mm/memory.c:301:9: sparse:    int

vim +/__remap_pfn_range +2802 mm/memory.c

  2789	
  2790	/**
  2791	 * remap_pfn_range - remap kernel memory to userspace
  2792	 * @vma: user vma to map to
  2793	 * @addr: target page aligned user address to start at
  2794	 * @pfn: page frame number of kernel physical memory address
  2795	 * @size: size of mapping area
  2796	 * @prot: page protection flags for this mapping
  2797	 *
  2798	 * Note: this is only safe if the mm semaphore is held when called.
  2799	 *
  2800	 * Return: %0 on success, negative error code otherwise.
  2801	 */
> 2802	int __remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
  2803			    unsigned long pfn, unsigned long size, pgprot_t prot,
  2804				unsigned int page_shift)
  2805	{
  2806		int err;
  2807	
  2808		err = track_pfn_remap(vma, &prot, pfn, addr, PAGE_ALIGN(size));
  2809		if (err)
  2810			return -EINVAL;
  2811	
  2812		err = __remap_pfn_range_notrack(vma, addr, pfn, size, prot, page_shift);
  2813		if (err)
  2814			untrack_pfn(vma, pfn, PAGE_ALIGN(size), true);
  2815		return err;
  2816	}
  2817	

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

                 reply	other threads:[~2025-11-18 16:46 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=202511190025.obom3fen-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kernel@openeuler.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=yintirui@huawei.com \
    /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.