Skip to contentSkip to conversation

linux-next: build warnings after merge of the block tree

DISCUSSION Stephen Rothwell 2 participants 2 messages Mar 3, 2020 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the block tree, today's linux-next build (arm multi_v7_defconfig) produced these warnings:

fs/io_uring.c: In function 'io_put_kbuf':
fs/io_uring.c:1651:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1651 | struct io_buffer *kbuf = (struct io_buffer *) req->rw.addr;
| ^
fs/io_uring.c: In function 'io_rw_buffer_select':
fs/io_uring.c:2209:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
2209 | struct io_buffer *kbuf = (struct io_buffer *) req->rw.addr;
| ^
fs/io_uring.c:2216:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
2216 | req->rw.addr = (u64) kbuf;
| ^
fs/io_uring.c: In function 'io_cleanup_req':
fs/io_uring.c:4897:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
4897 | kfree((void *)req->rw.addr);
| ^

Introduced by commits

7efcbb97deab ("io_uring: support buffer selection for OP_READ and OP_RECV") 8cab19f460b6 ("io_uring: add IOSQE_BUFFER_SELECT support for IORING_OP_READV")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 21 lines · Stephen Rothwell

Hi all,

After merging the block tree, today's linux-next build (arm multi_v7_defconfig) produced these warnings:

fs/io_uring.c: In function 'io_put_kbuf':
fs/io_uring.c:1651:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1651 | struct io_buffer *kbuf = (struct io_buffer *) req->rw.addr;
| ^
fs/io_uring.c: In function 'io_rw_buffer_select':
fs/io_uring.c:2209:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
2209 | struct io_buffer *kbuf = (struct io_buffer *) req->rw.addr;
| ^
fs/io_uring.c:2216:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
2216 | req->rw.addr = (u64) kbuf;
| ^
fs/io_uring.c: In function 'io_cleanup_req':
fs/io_uring.c:4897:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
4897 | kfree((void *)req->rw.addr);
| ^

Quoted 4 lines

Introduced by commits

7efcbb97deab ("io_uring: support buffer selection for OP_READ and OP_RECV") 8cab19f460b6 ("io_uring: add IOSQE_BUFFER_SELECT support for IORING_OP_READV")

Thanks Stephen, I added a fixup patch. I wish we had u64_to_ptr() and ptr_to_u64(), but that's only for the __user pointers...

Signature · 1 line
Jens Axboe