Skip to contentSkip to conversation

mm/memory.c:1238:1: sparse: sparse: symbol 'vma_needs_copy' was not declared. Should it be static?

PATCH kernel test robot 2 participants 3 messages Apr 13, 2022

Subsystems (2)
lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   c97e430ab5539993ab2afc6e80deea80aef9d799
commit: 729c63ce2bbd5813b8061e50cc38187aed05114c [3834/3955] mm/shmem: handle uffd-wp during fork()
config: i386-randconfig-s002 (https://download.01.org/0day-ci/archive/20220414/[email protected]/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=729c63ce2bbd5813b8061e50cc38187aed05114c
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 729c63ce2bbd5813b8061e50cc38187aed05114c
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate

sparse warnings: (new ones prefixed by >>)

>> mm/memory.c:1238:1: sparse: sparse: symbol 'vma_needs_copy' was not declared. Should it be static?

mm/memory.c:1031:17: sparse: sparse: context imbalance in 'copy_pte_range' - different lock contexts for basic block mm/memory.c:1827:16: sparse: sparse: context imbalance in '__get_locked_pte' - different lock contexts for basic block mm/memory.c:1875:9: sparse: sparse: context imbalance in 'insert_page' - different lock contexts for basic block mm/memory.c:2377:17: sparse: sparse: context imbalance in 'remap_pte_range' - different lock contexts for basic block mm/memory.c:2633:17: sparse: sparse: context imbalance in 'apply_to_pte_range' - unexpected unlock mm/memory.c:2922:9: sparse: sparse: context imbalance in 'wp_page_copy' - different lock contexts for basic block mm/memory.c:3274:17: sparse: sparse: context imbalance in 'wp_pfn_shared' - unexpected unlock mm/memory.c:3341:19: sparse: sparse: context imbalance in 'do_wp_page' - different lock contexts for basic block mm/memory.c:5211:5: sparse: sparse: context imbalance in 'follow_invalidate_pte' - wrong count at exit mm/memory.c:5332:23: sparse: sparse: context imbalance in 'follow_pfn' - unexpected unlock mm/memory.c:5362:9: sparse: sparse: context imbalance in 'follow_phys' - unexpected unlock mm/memory.c:5396:9: sparse: sparse: context imbalance in 'generic_access_phys' - unexpected unlock

Please review and possibly fold the followup patch.

Signature · 2 lines
0-DAY CI Kernel Test Service
https://01.org/lkp
author build bot
#1 lore raw

[RFC PATCH linux-next] mm/shmem: vma_needs_copy can be static

mm/memory.c:1238:1: warning: symbol 'vma_needs_copy' was not declared. Should it be static?

mm/memory.c:1238:1: warning: symbol 'vma_needs_copy' was not declared. Should it be static?

Fixes 729c63ce2bbd ("mm/shmem: handle uffd-wp during fork()")
---
 mm/memory.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/memory.c +1 -1
index a426c46dd6f68..92cca76bcd3ee 100644
@@ -1234,7 +1234,7 @@ copy_p4d_range(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma,
  * false when we can speed up fork() by allowing lazy page faults later until
  * when the child accesses the memory range.
  */
-bool
+static bool
 vma_needs_copy(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma)
 {
 	/*