[linux-next:master 7236/13217] arch/mips/include/asm/page.h:255:55: warning: cast to pointer from integer of different size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   509583475828c4fd86897113f78315c1431edcc3
commit: 592627ccbdff0ec6fff00fc761142a76db750dd4 [7236/13217] RDMA/rxe: Replace rxe_map and rxe_phys_buf by xarray
config: mips-randconfig-r011-20230214 (https://download.01.org/0day-ci/archive/20230216/202302162019.2WhIRkSA-lkp@xxxxxxxxx/config)
compiler: mips-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=592627ccbdff0ec6fff00fc761142a76db750dd4
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 592627ccbdff0ec6fff00fc761142a76db750dd4
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202302162019.2WhIRkSA-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from arch/mips/include/asm/page.h:270,
                    from arch/mips/include/asm/io.h:29,
                    from include/linux/io.h:13,
                    from arch/mips/include/asm/mips-cps.h:11,
                    from arch/mips/include/asm/smp-ops.h:16,
                    from arch/mips/include/asm/smp.h:21,
                    from include/linux/smp.h:113,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:63,
                    from include/linux/libnvdimm.h:13,
                    from drivers/infiniband/sw/rxe/rxe_mr.c:7:
   drivers/infiniband/sw/rxe/rxe_mr.c: In function 'rxe_set_page':
>> arch/mips/include/asm/page.h:255:55: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     255 | #define virt_to_pfn(kaddr)      PFN_DOWN(virt_to_phys((void *)(kaddr)))
         |                                                       ^
   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/mips/include/asm/page.h:255:33: note: in expansion of macro 'PFN_DOWN'
     255 | #define virt_to_pfn(kaddr)      PFN_DOWN(virt_to_phys((void *)(kaddr)))
         |                                 ^~~~~~~~
   arch/mips/include/asm/page.h:256:45: note: in expansion of macro 'virt_to_pfn'
     256 | #define virt_to_page(kaddr)     pfn_to_page(virt_to_pfn(kaddr))
         |                                             ^~~~~~~~~~~
   drivers/infiniband/sw/rxe/rxe_mr.c:216:29: note: in expansion of macro 'virt_to_page'
     216 |         struct page *page = virt_to_page(iova & mr->page_mask);
         |                             ^~~~~~~~~~~~
   drivers/infiniband/sw/rxe/rxe_mr.c: In function 'rxe_mr_copy_dma':
>> arch/mips/include/asm/page.h:255:55: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     255 | #define virt_to_pfn(kaddr)      PFN_DOWN(virt_to_phys((void *)(kaddr)))
         |                                                       ^
   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/mips/include/asm/page.h:255:33: note: in expansion of macro 'PFN_DOWN'
     255 | #define virt_to_pfn(kaddr)      PFN_DOWN(virt_to_phys((void *)(kaddr)))
         |                                 ^~~~~~~~
   arch/mips/include/asm/page.h:256:45: note: in expansion of macro 'virt_to_pfn'
     256 | #define virt_to_page(kaddr)     pfn_to_page(virt_to_pfn(kaddr))
         |                                             ^~~~~~~~~~~
   drivers/infiniband/sw/rxe/rxe_mr.c:291:24: note: in expansion of macro 'virt_to_page'
     291 |                 page = virt_to_page(iova & mr->page_mask);
         |                        ^~~~~~~~~~~~
   drivers/infiniband/sw/rxe/rxe_mr.c: In function 'rxe_mr_do_atomic_op':
>> arch/mips/include/asm/page.h:255:55: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     255 | #define virt_to_pfn(kaddr)      PFN_DOWN(virt_to_phys((void *)(kaddr)))
         |                                                       ^
   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/mips/include/asm/page.h:255:33: note: in expansion of macro 'PFN_DOWN'
     255 | #define virt_to_pfn(kaddr)      PFN_DOWN(virt_to_phys((void *)(kaddr)))
         |                                 ^~~~~~~~
   arch/mips/include/asm/page.h:256:45: note: in expansion of macro 'virt_to_pfn'
     256 | #define virt_to_page(kaddr)     pfn_to_page(virt_to_pfn(kaddr))
         |                                             ^~~~~~~~~~~
   drivers/infiniband/sw/rxe/rxe_mr.c:484:24: note: in expansion of macro 'virt_to_page'
     484 |                 page = virt_to_page(iova & PAGE_MASK);
         |                        ^~~~~~~~~~~~


vim +255 arch/mips/include/asm/page.h

e53639d8f31397 include/asm-mips/page.h      Ralf Baechle     2006-06-12  254  
37d15948eb7253 arch/mips/include/asm/page.h Florian Fainelli 2017-03-09 @255  #define virt_to_pfn(kaddr)   	PFN_DOWN(virt_to_phys((void *)(kaddr)))
37d15948eb7253 arch/mips/include/asm/page.h Florian Fainelli 2017-03-09  256  #define virt_to_page(kaddr)	pfn_to_page(virt_to_pfn(kaddr))
d3ce88431892b7 arch/mips/include/asm/page.h Ralf Baechle     2012-12-28  257  

:::::: The code at line 255 was first introduced by commit
:::::: 37d15948eb72533757ff352cf6f92dc64daa291f MIPS: page.h: Define virt_to_pfn()

:::::: TO: Florian Fainelli <f.fainelli@xxxxxxxxx>
:::::: CC: James Hogan <jhogan@xxxxxxxxxx>

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux