lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202206250257.AhQLLkHA-lkp@intel.com>
Date:   Sat, 25 Jun 2022 10:58:50 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jane Chu <jane.chu@...cle.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Dan Williams <dan.j.williams@...el.com>,
        Christoph Hellwig <hch@....de>
Subject: 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)'}

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@...el.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	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (272183 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ