From: kernel test robot <lkp@intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Leon Romanovsky <leon@kernel.org>,
Sasha Levin <sashal@kernel.org>
Subject: [linux-stable-rc:linux-5.4.y 5364/5387] drivers/infiniband/sw/siw/siw_qp_tx.c:32:37: warning: cast to pointer from integer of different size
Date: Sat, 17 Sep 2022 02:18:28 +0800 [thread overview]
Message-ID: <202209170232.grVMomkJ-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
head: ba0de553122f5be5dde3102746a1060fd2737e63
commit: e7f78835d551bb2deb5aa3346d84c8f03ade313d [5364/5387] RDMA/siw: Pass a pointer to virt_to_page()
config: riscv-randconfig-r013-20220916 (https://download.01.org/0day-ci/archive/20220917/202209170232.grVMomkJ-lkp@intel.com/config)
compiler: riscv32-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/stable/linux-stable-rc.git/commit/?id=e7f78835d551bb2deb5aa3346d84c8f03ade313d
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-5.4.y
git checkout e7f78835d551bb2deb5aa3346d84c8f03ade313d
# 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=riscv SHELL=/bin/bash drivers/infiniband/sw/siw/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/riscv/include/asm/page.h:130,
from arch/riscv/include/asm/thread_info.h:11,
from include/linux/thread_info.h:39,
from include/asm-generic/preempt.h:5,
from ./arch/riscv/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:101,
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: cast to pointer from integer of different size [-Wint-to-pointer-cast]
32 | return virt_to_page((void *)paddr);
| ^
include/asm-generic/memory_model.h:69:32: note: in definition of macro '__pfn_to_page'
69 | ({ unsigned long __pfn = (pfn); \
| ^~~
arch/riscv/include/asm/page.h:100:34: note: in expansion of macro 'PFN_DOWN'
100 | #define phys_to_pfn(phys) (PFN_DOWN(phys))
| ^~~~~~~~
arch/riscv/include/asm/page.h:103:34: note: in expansion of macro 'phys_to_pfn'
103 | #define virt_to_pfn(vaddr) (phys_to_pfn(__pa(vaddr)))
| ^~~~~~~~~~~
arch/riscv/include/asm/page.h:103:46: note: in expansion of macro '__pa'
103 | #define virt_to_pfn(vaddr) (phys_to_pfn(__pa(vaddr)))
| ^~~~
arch/riscv/include/asm/page.h:106:46: note: in expansion of macro 'virt_to_pfn'
106 | #define virt_to_page(vaddr) (pfn_to_page(virt_to_pfn(vaddr)))
| ^~~~~~~~~~~
drivers/infiniband/sw/siw/siw_qp_tx.c:32:24: note: in expansion of macro 'virt_to_page'
32 | return virt_to_page((void *)paddr);
| ^~~~~~~~~~~~
vim +32 drivers/infiniband/sw/siw/siw_qp_tx.c
5
6 #include <linux/errno.h>
7 #include <linux/types.h>
> 8 #include <linux/net.h>
9 #include <linux/scatterlist.h>
10 #include <linux/highmem.h>
11 #include <net/tcp.h>
12
13 #include <rdma/iw_cm.h>
14 #include <rdma/ib_verbs.h>
15 #include <rdma/ib_user_verbs.h>
16
17 #include "siw.h"
18 #include "siw_verbs.h"
19 #include "siw_mem.h"
20
21 #define MAX_HDR_INLINE \
22 (((uint32_t)(sizeof(struct siw_rreq_pkt) - \
23 sizeof(struct iwarp_send))) & 0xF8)
24
25 static struct page *siw_get_pblpage(struct siw_mem *mem, u64 addr, int *idx)
26 {
27 struct siw_pbl *pbl = mem->pbl;
28 u64 offset = addr - mem->va;
29 dma_addr_t paddr = siw_pbl_get_buffer(pbl, offset, NULL, idx);
30
31 if (paddr)
> 32 return virt_to_page((void *)paddr);
33
34 return NULL;
35 }
36
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next reply other threads:[~2022-09-16 18:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 18:18 kernel test robot [this message]
2022-09-18 14:33 ` [linux-stable-rc:linux-5.4.y 5364/5387] drivers/infiniband/sw/siw/siw_qp_tx.c:32:37: warning: cast to pointer from integer of different size Linus Walleij
2022-09-18 14:33 ` Linus Walleij
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=202209170232.grVMomkJ-lkp@intel.com \
--to=lkp@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@lists.01.org \
--cc=leon@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sashal@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.