public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Hildenbrand <david@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [davidhildenbrand:rmap_id 2/4] kernel/fork.c:939:2: error: implicit declaration of function 'mm_free_rmap_id' is invalid in C99
Date: Fri, 8 Sep 2023 10:23:50 +0800	[thread overview]
Message-ID: <202309081027.tRNUzl73-lkp@intel.com> (raw)

tree:   https://github.com/davidhildenbrand/linux rmap_id
head:   17125381adce3cd008977d62b31863b283bf75bb
commit: 1730d1c9fe15d22df5daa27747c938e2093f1541 [2/4] rmap_id per MM
config: um-allyesconfig (https://download.01.org/0day-ci/archive/20230908/202309081027.tRNUzl73-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230908/202309081027.tRNUzl73-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/202309081027.tRNUzl73-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from kernel/fork.c:34:
   In file included from include/linux/mempolicy.h:15:
   In file included from include/linux/pagemap.h:11:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/um/include/asm/hardirq.h:5:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                                                     ^
   In file included from kernel/fork.c:34:
   In file included from include/linux/mempolicy.h:15:
   In file included from include/linux/pagemap.h:11:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/um/include/asm/hardirq.h:5:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                                                     ^
   In file included from kernel/fork.c:34:
   In file included from include/linux/mempolicy.h:15:
   In file included from include/linux/pagemap.h:11:
   In file included from include/linux/highmem.h:12:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/um/include/asm/hardirq.h:5:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:692:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsb(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:700:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsw(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:708:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           readsl(PCI_IOBASE + addr, buffer, count);
                  ~~~~~~~~~~ ^
   include/asm-generic/io.h:717:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesb(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:726:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesw(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   include/asm-generic/io.h:735:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           writesl(PCI_IOBASE + addr, buffer, count);
                   ~~~~~~~~~~ ^
   kernel/fork.c:833:9: warning: 'mm_alloc_rmap_id' macro redefined [-Wmacro-redefined]
   #define mm_alloc_rmap_id(mm)
           ^
   kernel/fork.c:832:9: note: previous definition is here
   #define mm_alloc_rmap_id(mm)    (0)
           ^
>> kernel/fork.c:939:2: error: implicit declaration of function 'mm_free_rmap_id' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           mm_free_rmap_id(mm);
           ^
   kernel/fork.c:939:2: note: did you mean 'mm_free_pgd'?
   kernel/fork.c:801:20: note: 'mm_free_pgd' declared here
   static inline void mm_free_pgd(struct mm_struct *mm)
                      ^
   kernel/fork.c:1321:26: error: expected expression
           if (mm_alloc_rmap_id(mm))
                                   ^
   kernel/fork.c:1322:22: error: expected ';' after goto statement
                   goto fail_no_rmapid
                                      ^
                                      ;
   kernel/fork.c:1343:2: error: implicit declaration of function 'mm_free_rmap_id' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           mm_free_rmap_id(mm);
           ^
   kernel/fork.c:1322:8: error: use of undeclared label 'fail_no_rmapid'
                   goto fail_no_rmapid
                        ^
   13 warnings and 5 errors generated.


vim +/mm_free_rmap_id +939 kernel/fork.c

   923	
   924	/*
   925	 * Called when the last reference to the mm
   926	 * is dropped: either by a lazy thread or by
   927	 * mmput. Free the page directory and the mm.
   928	 */
   929	void __mmdrop(struct mm_struct *mm)
   930	{
   931		BUG_ON(mm == &init_mm);
   932		WARN_ON_ONCE(mm == current->mm);
   933	
   934		/* Ensure no CPUs are using this as their lazy tlb mm */
   935		cleanup_lazy_tlbs(mm);
   936	
   937		WARN_ON_ONCE(mm == current->active_mm);
   938		mm_free_pgd(mm);
 > 939		mm_free_rmap_id(mm);
   940		destroy_context(mm);
   941		mmu_notifier_subscriptions_destroy(mm);
   942		check_mm(mm);
   943		put_user_ns(mm->user_ns);
   944		mm_pasid_drop(mm);
   945		mm_destroy_cid(mm);
   946		percpu_counter_destroy_many(mm->rss_stat, NR_MM_COUNTERS);
   947	
   948		free_mm(mm);
   949	}
   950	EXPORT_SYMBOL_GPL(__mmdrop);
   951	

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

                 reply	other threads:[~2023-09-08  2:24 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=202309081027.tRNUzl73-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=david@redhat.com \
    --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