2022-07-20 03:49:16

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build warning after merge of the block tree

Hi all,

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")

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2022-07-20 12:53:11

by Jens Axboe

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the block tree

On 7/19/22 9:33 PM, Stephen Rothwell wrote:
> Hi all,
>
> 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")

I pushed a fix for this, thanks Stephen.

--
Jens Axboe

2022-07-20 13:11:03

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build warning after merge of the block tree

Hi all,

On Wed, 20 Jul 2022 13:33:06 +1000 Stephen Rothwell <[email protected]> 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 protected]>
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 protected]>
---
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


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature