[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202205211911.kEgr1rzS-lkp@intel.com>
Date: Sat, 21 May 2022 19:36:50 +0800
From: kernel test robot <lkp@...el.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [arm-integrator:kernel-in-vmalloc-v5.18-rc1 8/16]
drivers/infiniband/sw/siw/siw_qp_tx.c:32:37: warning: passing argument 1 of
'virt_to_pfn' makes pointer from integer without a cast
tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git kernel-in-vmalloc-v5.18-rc1
head: b9b1d325d83c15b2e27bfa8635f99a7d20811457
commit: 16d1427dc6f44107571afbf96254956716c9ad1f [8/16] ARM: Compile the kernel into VMALLOC
config: arm-buildonly-randconfig-r002-20220519 (https://download.01.org/0day-ci/archive/20220521/202205211911.kEgr1rzS-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.3.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/linusw/linux-integrator.git/commit/?id=16d1427dc6f44107571afbf96254956716c9ad1f
git remote add arm-integrator https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
git fetch --no-tags arm-integrator kernel-in-vmalloc-v5.18-rc1
git checkout 16d1427dc6f44107571afbf96254956716c9ad1f
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/infiniband/sw/siw/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
In file included from arch/arm/include/asm/memory.h:448,
from arch/arm/include/asm/page.h:163,
from arch/arm/include/asm/thread_info.h:14,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/arm/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/percpu.h:6,
from include/linux/prandom.h:12,
from include/linux/random.h:120,
from include/linux/net.h:18,
from drivers/infiniband/sw/siw/siw_qp_tx.c:8:
drivers/infiniband/sw/siw/siw_qp_tx.c: In function 'siw_get_pblpage':
>> drivers/infiniband/sw/siw/siw_qp_tx.c:32:37: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
32 | return virt_to_page(paddr);
| ^~~~~
| |
| dma_addr_t {aka unsigned int}
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))
| ^~~
drivers/infiniband/sw/siw/siw_qp_tx.c:32:24: note: in expansion of macro 'virt_to_page'
32 | return virt_to_page(paddr);
| ^~~~~~~~~~~~
In file included from arch/arm/include/asm/page.h:163,
from arch/arm/include/asm/thread_info.h:14,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/arm/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/percpu.h:6,
from include/linux/prandom.h:12,
from include/linux/random.h:120,
from include/linux/net.h:18,
from drivers/infiniband/sw/siw/siw_qp_tx.c:8:
arch/arm/include/asm/memory.h:323:53: note: expected 'const void *' but argument is of type 'dma_addr_t' {aka 'unsigned int'}
323 | static inline unsigned long virt_to_pfn(const void *p)
| ~~~~~~~~~~~~^
In file included from arch/arm/include/asm/memory.h:448,
from arch/arm/include/asm/page.h:163,
from arch/arm/include/asm/thread_info.h:14,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/arm/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/percpu.h:6,
from include/linux/prandom.h:12,
from include/linux/random.h:120,
from include/linux/net.h:18,
from drivers/infiniband/sw/siw/siw_qp_tx.c:8:
drivers/infiniband/sw/siw/siw_qp_tx.c: In function 'siw_tx_hdt':
drivers/infiniband/sw/siw/siw_qp_tx.c:538:67: warning: passing argument 1 of 'virt_to_pfn' makes pointer from integer without a cast [-Wint-conversion]
538 | page_array[seg] = virt_to_page(va & PAGE_MASK);
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))
| ^~~
drivers/infiniband/sw/siw/siw_qp_tx.c:538:51: note: in expansion of macro 'virt_to_page'
538 | page_array[seg] = virt_to_page(va & PAGE_MASK);
| ^~~~~~~~~~~~
In file included from arch/arm/include/asm/page.h:163,
from arch/arm/include/asm/thread_info.h:14,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/arm/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/percpu.h:6,
from include/linux/prandom.h:12,
from include/linux/random.h:120,
from include/linux/net.h:18,
from drivers/infiniband/sw/siw/siw_qp_tx.c:8:
arch/arm/include/asm/memory.h:323:53: note: expected 'const void *' but argument is of type 'u64' {aka 'long long unsigned int'}
323 | static inline unsigned long virt_to_pfn(const void *p)
| ~~~~~~~~~~~~^
vim +/virt_to_pfn +32 drivers/infiniband/sw/siw/siw_qp_tx.c
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 5
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 6 #include <linux/errno.h>
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 7 #include <linux/types.h>
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 @8 #include <linux/net.h>
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 9 #include <linux/scatterlist.h>
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 10 #include <linux/highmem.h>
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 11 #include <net/tcp.h>
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 12
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 13 #include <rdma/iw_cm.h>
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 14 #include <rdma/ib_verbs.h>
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 15 #include <rdma/ib_user_verbs.h>
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 16
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 17 #include "siw.h"
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 18 #include "siw_verbs.h"
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 19 #include "siw_mem.h"
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 20
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 21 #define MAX_HDR_INLINE \
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 22 (((uint32_t)(sizeof(struct siw_rreq_pkt) - \
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 23 sizeof(struct iwarp_send))) & 0xF8)
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 24
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 25 static struct page *siw_get_pblpage(struct siw_mem *mem, u64 addr, int *idx)
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 26 {
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 27 struct siw_pbl *pbl = mem->pbl;
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 28 u64 offset = addr - mem->va;
c536277e0db1ad Bernard Metzler 2019-08-22 29 dma_addr_t paddr = siw_pbl_get_buffer(pbl, offset, NULL, idx);
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 30
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 31 if (paddr)
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 @32 return virt_to_page(paddr);
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 33
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 34 return NULL;
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 35 }
b9be6f18cf9ed0 Bernard Metzler 2019-06-20 36
:::::: The code at line 32 was first introduced by commit
:::::: b9be6f18cf9ed04dd8087cb9d69de6e90d8ceb08 rdma/siw: transmit path
:::::: TO: Bernard Metzler <bmt@...ich.ibm.com>
:::::: CC: Jason Gunthorpe <jgg@...lanox.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists