mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jane Chu <jane.chu@oracle.com>
To: kernel test robot <lkp@intel.com>
Cc: "kbuild-all@lists.01.org" <kbuild-all@lists.01.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: drivers/nvdimm/pmem.c:48:20: error: conflicting types for 'to_phys'; have 'phys_addr_t(struct pmem_device *, phys_addr_t)' {aka 'long long unsigned int(struct pmem_device *, long long unsigned int)'}
Date: Tue, 12 Jul 2022 23:33:02 +0000	[thread overview]
Message-ID: <4a3f9fb7-d39d-684a-610a-cece69b74bb0@oracle.com> (raw)
In-Reply-To: <202206250257.AhQLLkHA-lkp@intel.com>

Apology for delayed reply, this issue has been fixed.

-jane

On 6/24/2022 7:58 PM, kernel test robot wrote:
> Hi Jane,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   92f20ff72066d8d7e2ffb655c2236259ac9d1c5d
> commit: 9409c9b6709e59866ed3540b5d7f5291439e4833 pmem: refactor pmem_clear_poison()
> date:   6 weeks ago
> config: um-allmodconfig
> compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
> reproduce (this is a W=1 build):
>          # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9409c9b6709e59866ed3540b5d7f5291439e4833
>          git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>          git fetch --no-tags linus master
>          git checkout 9409c9b6709e59866ed3540b5d7f5291439e4833
>          # save the config file
>          mkdir build_dir && cp config build_dir/.config
>          make W=1 O=build_dir ARCH=um SHELL=/bin/bash
> 
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>>> drivers/nvdimm/pmem.c:48:20: error: conflicting types for 'to_phys'; have 'phys_addr_t(struct pmem_device *, phys_addr_t)' {aka 'long long unsigned int(struct pmem_device *, long long unsigned int)'}
>        48 | static phys_addr_t to_phys(struct pmem_device *pmem, phys_addr_t offset)
>           |                    ^~~~~~~
>     In file included from arch/um/include/asm/page.h:98,
>                      from arch/um/include/asm/thread_info.h:15,
>                      from include/linux/thread_info.h:60,
>                      from include/asm-generic/preempt.h:5,
>                      from ./arch/um/include/generated/asm/preempt.h:1,
>                      from include/linux/preempt.h:78,
>                      from include/linux/spinlock.h:55,
>                      from include/linux/wait.h:9,
>                      from include/linux/wait_bit.h:8,
>                      from include/linux/fs.h:6,
>                      from include/linux/highmem.h:5,
>                      from include/linux/bvec.h:10,
>                      from include/linux/blk_types.h:10,
>                      from include/linux/blkdev.h:9,
>                      from drivers/nvdimm/pmem.c:10:
>     arch/um/include/shared/mem.h:12:29: note: previous definition of 'to_phys' with type 'long unsigned int(void *)'
>        12 | static inline unsigned long to_phys(void *virt)
>           |                             ^~~~~~~
>     In file included from arch/um/include/asm/page.h:114,
>                      from arch/um/include/asm/thread_info.h:15,
>                      from include/linux/thread_info.h:60,
>                      from include/asm-generic/preempt.h:5,
>                      from ./arch/um/include/generated/asm/preempt.h:1,
>                      from include/linux/preempt.h:78,
>                      from include/linux/spinlock.h:55,
>                      from include/linux/wait.h:9,
>                      from include/linux/wait_bit.h:8,
>                      from include/linux/fs.h:6,
>                      from include/linux/highmem.h:5,
>                      from include/linux/bvec.h:10,
>                      from include/linux/blk_types.h:10,
>                      from include/linux/blkdev.h:9,
>                      from drivers/nvdimm/pmem.c:10:
>     drivers/nvdimm/pmem.c: In function 'pmem_dax_zero_page_range':
>>> arch/um/include/asm/page.h:105:20: error: too few arguments to function 'to_phys'
>       105 | #define __pa(virt) to_phys((void *) (unsigned long) (virt))
>           |                    ^~~~~~~
>     include/asm-generic/memory_model.h:18:46: note: in definition of macro '__pfn_to_page'
>        18 | #define __pfn_to_page(pfn)      (mem_map + ((pfn) - ARCH_PFN_OFFSET))
>           |                                              ^~~
>     arch/um/include/asm/pgtable.h:276:40: note: in expansion of macro 'phys_to_pfn'
>       276 | #define phys_to_page(phys) pfn_to_page(phys_to_pfn(phys))
>           |                                        ^~~~~~~~~~~
>     arch/um/include/asm/pgtable.h:277:30: note: in expansion of macro 'phys_to_page'
>       277 | #define __virt_to_page(virt) phys_to_page(__pa(virt))
>           |                              ^~~~~~~~~~~~
>     arch/um/include/asm/pgtable.h:277:43: note: in expansion of macro '__pa'
>       277 | #define __virt_to_page(virt) phys_to_page(__pa(virt))
>           |                                           ^~~~
>     arch/um/include/asm/pgtable.h:279:28: note: in expansion of macro '__virt_to_page'
>       279 | #define virt_to_page(addr) __virt_to_page((const unsigned long) addr)
>           |                            ^~~~~~~~~~~~~~
>     arch/um/include/asm/pgtable.h:93:26: note: in expansion of macro 'virt_to_page'
>        93 | #define ZERO_PAGE(vaddr) virt_to_page(empty_zero_page)
>           |                          ^~~~~~~~~~~~
>     drivers/nvdimm/pmem.c:299:56: note: in expansion of macro 'ZERO_PAGE'
>       299 |         return blk_status_to_errno(pmem_do_write(pmem, ZERO_PAGE(0), 0,
>           |                                                        ^~~~~~~~~
>     drivers/nvdimm/pmem.c:48:20: note: declared here
>        48 | static phys_addr_t to_phys(struct pmem_device *pmem, phys_addr_t offset)
>           |                    ^~~~~~~
>     drivers/nvdimm/pmem.c:302:1: error: control reaches end of non-void function [-Werror=return-type]
>       302 | }
>           | ^
>     cc1: some warnings being treated as errors
> 
> 
> vim +48 drivers/nvdimm/pmem.c
> 
>      47	
>    > 48	static phys_addr_t to_phys(struct pmem_device *pmem, phys_addr_t offset)
>      49	{
>      50		return pmem->phys_addr + offset;
>      51	}
>      52	
> 


      reply	other threads:[~2022-07-12 23:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-25  2:58 kernel test robot
2022-07-12 23:33 ` Jane Chu [this message]

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=4a3f9fb7-d39d-684a-610a-cece69b74bb0@oracle.com \
    --to=jane.chu@oracle.com \
    --cc=dan.j.williams@intel.com \
    --cc=hch@lst.de \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.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

all inboxes | Powered by JetHome®