Subject: Re: linux-next: build warning after merge of the block tree

From: Stephen Rothwell <[email-masked]>
Date: Wed, 20 Jul 2022 22:10:23 +1000

Hi all,

On Wed, 20 Jul 2022 13:33:06 +1000 Stephen Rothwell <[email-masked]> wrote:
>
> After merging the block tree, today's linux-next build (arm
> multi_v7_defconfig) produced this warning:
> 
> io_uring/net.c: In function 'io_sendzc':
> io_uring/net.c:980:41: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>   980 |                                         (u64)zc->buf, zc->len);
>       |                                         ^
> 
> Introduced by commit
> 
>   bb4019de9ea1 ("io_uring: sendzc with fixed buffers")

This become an error in my i386 defconfig build, so I applied the
following patch.

From: Stephen Rothwell <[email-masked]>
Date: Wed, 20 Jul 2022 21:19:15 +1000
Subject: [PATCH] fix up for "io_uring: sendzc with fixed buffers"

Signed-off-by: Stephen Rothwell <[email-masked]>
---
 io_uring/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io_uring/net.c b/io_uring/net.c
index 282401255ab4..903a0de689fb 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -977,7 +977,7 @@ int io_sendzc(struct io_kiocb *req, unsigned int issue_flags)
 
 	if (zc->flags & IORING_RECVSEND_FIXED_BUF) {
 		ret = io_import_fixed(WRITE, &msg.msg_iter, req->imu,
-					(u64)zc->buf, zc->len);
+					(u64)(unsigned long)zc->buf, zc->len);
 		if (unlikely(ret))
 				return ret;
 	} else {
-- 
2.35.1

-- 
Cheers,
Stephen Rothwell