linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Nick Hu <nickhu@andestech.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Palmer Dabbelt <palmerdabbelt@google.com>
Subject: arch/riscv/include/asm/pgtable-64.h:64:1: warning: control reaches end of non-void function
Date: Tue, 4 Feb 2020 14:29:54 +0800	[thread overview]
Message-ID: <202002041446.bHOayOpR%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3299 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d4e9056daedca3891414fe3c91de3449a5dad0f2
commit: 8ad8b72721d0f07fa02dbe71f901743f9c71c8e6 riscv: Add KASAN support
date:   12 days ago
config: riscv-randconfig-a001-20200204 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 8ad8b72721d0f07fa02dbe71f901743f9c71c8e6
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=riscv 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   In file included from arch/riscv/include/asm/page.h:131:0,
                    from arch/riscv/include/asm/thread_info.h:11,
                    from include/linux/thread_info.h:38,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/riscv/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:6,
                    from include/linux/mm.h:10,
                    from include/linux/memblock.h:13,
                    from mm/kasan/init.c:14:
   arch/riscv/include/asm/pgtable-64.h: In function 'pud_page':
   include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared (first use in this function); did you mean 'mem_map'?
    #define __pfn_to_page(pfn) (vmemmap + (pfn))
                                ^
   include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
    #define pfn_to_page __pfn_to_page
                        ^~~~~~~~~~~~~
   arch/riscv/include/asm/pgtable-64.h:63:9: note: in expansion of macro 'pfn_to_page'
     return pfn_to_page(pud_val(pud) >> _PAGE_PFN_SHIFT);
            ^~~~~~~~~~~
   include/asm-generic/memory_model.h:54:29: note: each undeclared identifier is reported only once for each function it appears in
    #define __pfn_to_page(pfn) (vmemmap + (pfn))
                                ^
   include/asm-generic/memory_model.h:82:21: note: in expansion of macro '__pfn_to_page'
    #define pfn_to_page __pfn_to_page
                        ^~~~~~~~~~~~~
   arch/riscv/include/asm/pgtable-64.h:63:9: note: in expansion of macro 'pfn_to_page'
     return pfn_to_page(pud_val(pud) >> _PAGE_PFN_SHIFT);
            ^~~~~~~~~~~
   In file included from arch/riscv/include/asm/pgtable.h:23:0,
                    from include/linux/mm.h:99,
                    from include/linux/memblock.h:13,
                    from mm/kasan/init.c:14:
>> arch/riscv/include/asm/pgtable-64.h:64:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^

vim +64 arch/riscv/include/asm/pgtable-64.h

    60	
    61	static inline struct page *pud_page(pud_t pud)
    62	{
    63		return pfn_to_page(pud_val(pud) >> _PAGE_PFN_SHIFT);
  > 64	}
    65	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30520 bytes --]

                 reply	other threads:[~2020-02-04  6:31 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=202002041446.bHOayOpR%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickhu@andestech.com \
    --cc=palmerdabbelt@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).