[isilence:zc_v3 24/28] io_uring/net.c:862:41: warning: cast from pointer to integer of different size
From: kernel test robot
Date: Mon Jun 27 2022 - 14:16:56 EST
tree: https://github.com/isilence/linux zc_v3
head: cd0bc816ae8dbc546df5c09cee92459ad759c4d1
commit: d9672980cdc25db17837152a58f2fea95c2c8e99 [24/28] io_uring: sendzc with fixed buffers
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20220628/202206280255.6yEuIf06-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/isilence/linux/commit/d9672980cdc25db17837152a58f2fea95c2c8e99
git remote add isilence https://github.com/isilence/linux
git fetch --no-tags isilence zc_v3
git checkout d9672980cdc25db17837152a58f2fea95c2c8e99
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
io_uring/net.c: In function 'io_sendzc':
>> io_uring/net.c:862:41: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
862 | (u64)zc->buf, zc->len);
| ^
vim +862 io_uring/net.c
827
828 int io_sendzc(struct io_kiocb *req, unsigned int issue_flags)
829 {
830 struct sockaddr_storage address;
831 struct io_ring_ctx *ctx = req->ctx;
832 struct io_sendzc *zc = io_kiocb_to_cmd(req);
833 struct io_notif_slot *notif_slot;
834 struct io_notif *notif;
835 struct msghdr msg;
836 struct iovec iov;
837 struct socket *sock;
838 unsigned msg_flags;
839 int ret, min_ret = 0;
840
841 if (issue_flags & IO_URING_F_UNLOCKED)
842 return -EAGAIN;
843 sock = sock_from_file(req->file);
844 if (unlikely(!sock))
845 return -ENOTSOCK;
846
847 notif_slot = io_get_notif_slot(ctx, zc->slot_idx);
848 if (!notif_slot)
849 return -EINVAL;
850 notif = io_get_notif(ctx, notif_slot);
851 if (!notif)
852 return -ENOMEM;
853
854 msg.msg_name = NULL;
855 msg.msg_control = NULL;
856 msg.msg_controllen = 0;
857 msg.msg_namelen = 0;
858 msg.msg_managed_data = 1;
859
860 if (zc->zc_flags & IORING_SENDZC_FIXED_BUF) {
861 ret = io_import_fixed(WRITE, &msg.msg_iter, req->imu,
> 862 (u64)zc->buf, zc->len);
--
0-DAY CI Kernel Test Service
https://01.org/lkp