]> git.itanic.dy.fi Git - linux-stable/commit
pmem: fix a name collision
authorJane Chu <jane.chu@oracle.com>
Thu, 30 Jun 2022 18:28:02 +0000 (12:28 -0600)
committerDan Williams <dan.j.williams@intel.com>
Wed, 13 Jul 2022 00:52:16 +0000 (17:52 -0700)
commit149d17140bcedc906082c4f874dec98b1ffc5a90
tree901a6db7088eeeee7c3b1f6006cb8dce5ef24301
parent88084a3df1672e131ddc1b4e39eeacfd39864acf
pmem: fix a name collision

Kernel test robot detected name collision when compiled on 'um'
architecture.  Rename "to_phys()"  to "pmem_to_phys()".

>> 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,

   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)
         |                             ^~~~~~~

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

Fixes: 9409c9b6709e (pmem: refactor pmem_clear_poison())
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jane Chu <jane.chu@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220630182802.3250449-1-jane.chu@oracle.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/pmem.c