linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jianhui Zhou <jianhuizzzzz@gmail.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	David Hildenbrand <david@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: [akpm-mm:mm-unstable 34/207] include/linux/hugetlb.h:1214:9: error: call to undeclared function 'linear_page_index'; ISO C99 and later do not support implicit function declarations
Date: Sat, 07 Mar 2026 12:04:55 +0800	[thread overview]
Message-ID: <202603071118.PmcGAhcg-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
head:   49cb736d092aaa856283e33b78ec3afb3964d82f
commit: cd9119a9480d9d93fdf06792f8f9917cc4f9999c [34/207] mm/userfaultfd: fix hugetlb fault mutex hash calculation
config: x86_64-allnoconfig (https://download.01.org/0day-ci/archive/20260307/202603071118.PmcGAhcg-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260307/202603071118.PmcGAhcg-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/202603071118.PmcGAhcg-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from mm/show_mem.c:12:
>> include/linux/hugetlb.h:1214:9: error: call to undeclared function 'linear_page_index'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1214 |         return linear_page_index(vma, address);
         |                ^
   In file included from mm/show_mem.c:15:
   In file included from include/linux/swap.h:13:
>> include/linux/pagemap.h:1079:23: error: conflicting types for 'linear_page_index'
    1079 | static inline pgoff_t linear_page_index(const struct vm_area_struct *vma,
         |                       ^
   include/linux/hugetlb.h:1214:9: note: previous implicit declaration is here
    1214 |         return linear_page_index(vma, address);
         |                ^
   2 errors generated.
--
   In file included from mm/vma_init.c:8:
   In file included from mm/vma_internal.h:20:
>> include/linux/hugetlb.h:1214:9: error: call to undeclared function 'linear_page_index'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1214 |         return linear_page_index(vma, address);
         |                ^
   In file included from mm/vma_init.c:8:
   In file included from mm/vma_internal.h:23:
   In file included from include/linux/ksm.h:13:
>> include/linux/pagemap.h:1079:23: error: conflicting types for 'linear_page_index'
    1079 | static inline pgoff_t linear_page_index(const struct vm_area_struct *vma,
         |                       ^
   include/linux/hugetlb.h:1214:9: note: previous implicit declaration is here
    1214 |         return linear_page_index(vma, address);
         |                ^
   In file included from mm/vma_init.c:8:
   In file included from mm/vma_internal.h:31:
   include/linux/mman.h:157:9: warning: division by zero is undefined [-Wdivision-by-zero]
     157 |                _calc_vm_trans(flags, MAP_SYNC,       VM_SYNC      ) |
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mman.h:135:21: note: expanded from macro '_calc_vm_trans'
     135 |    : ((x) & (bit1)) / ((bit1) / (bit2))))
         |                     ^ ~~~~~~~~~~~~~~~~~
   1 warning and 2 errors generated.
--
   In file included from mm/mprotect.c:13:
>> include/linux/hugetlb.h:1214:9: error: call to undeclared function 'linear_page_index'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1214 |         return linear_page_index(vma, address);
         |                ^
   In file included from mm/mprotect.c:15:
   include/linux/mman.h:157:9: warning: division by zero is undefined [-Wdivision-by-zero]
     157 |                _calc_vm_trans(flags, MAP_SYNC,       VM_SYNC      ) |
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mman.h:135:21: note: expanded from macro '_calc_vm_trans'
     135 |    : ((x) & (bit1)) / ((bit1) / (bit2))))
         |                     ^ ~~~~~~~~~~~~~~~~~
   In file included from mm/mprotect.c:19:
   In file included from include/linux/mempolicy.h:16:
>> include/linux/pagemap.h:1079:23: error: conflicting types for 'linear_page_index'
    1079 | static inline pgoff_t linear_page_index(const struct vm_area_struct *vma,
         |                       ^
   include/linux/hugetlb.h:1214:9: note: previous implicit declaration is here
    1214 |         return linear_page_index(vma, address);
         |                ^
   1 warning and 2 errors generated.


vim +/linear_page_index +1214 include/linux/hugetlb.h

  1210	
  1211	static inline pgoff_t vma_hugecache_offset(struct hstate *h,
  1212			struct vm_area_struct *vma, unsigned long address)
  1213	{
> 1214		return linear_page_index(vma, address);
  1215	}
  1216	

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


                 reply	other threads:[~2026-03-07  4:05 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=202603071118.PmcGAhcg-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=jianhuizzzzz@gmail.com \
    --cc=linux-mm@kvack.org \
    --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