fs/io_uring.c: In function 'io_alloc_page_table': include/linux/minmax.h:20:28: warning: comparison of distinct pointer types lacks a cast Cast everything to size_t using min_t. Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Fixes: 9123c8ffce16 ("io_uring: add helpers for 2 level table alloc") Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx> --- fs/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index 315fb5df5054..a06c07210696 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -7089,7 +7089,7 @@ static void **io_alloc_page_table(size_t size) return NULL; for (i = 0; i < nr_tables; i++) { - unsigned int this_size = min(size, PAGE_SIZE); + unsigned int this_size = min_t(size_t, size, PAGE_SIZE); table[i] = kzalloc(this_size, GFP_KERNEL); if (!table[i]) { -- 2.31.1