On 19/04/25 06:47PM, Pavel Begunkov wrote: >We don't need special handling for the first page in >io_coalesce_buffer(), move it inside the loop. > >Signed-off-by: Pavel Begunkov >--- > io_uring/rsrc.c | 47 ++++++++++++++++++++++------------------------- > 1 file changed, 22 insertions(+), 25 deletions(-) > >diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c >index 40061a31cc1f..21613e6074d4 100644 >--- a/io_uring/rsrc.c >+++ b/io_uring/rsrc.c >@@ -685,37 +685,34 @@ static bool io_coalesce_buffer(struct page ***pages, int *nr_pages, > struct io_imu_folio_data *data) > { > struct page **page_array = *pages, **new_array = NULL; >- int nr_pages_left = *nr_pages, i, j; >- int nr_folios = data->nr_folios; >+ unsigned nr_pages_left = *nr_pages; >+ unsigned nr_folios = data->nr_folios; >+ unsigned i, j; checkpatch.pl complains about just "unsigned", "unsigned int" is preferred. > > /* Store head pages only*/ >- new_array = kvmalloc_array(nr_folios, sizeof(struct page *), >- GFP_KERNEL); >+ new_array = kvmalloc_array(nr_folios, sizeof(struct page *), GFP_KERNEL); Not sure whether 80 line length is preferred in uring subsystem, if yes then this breaks it. --Nitesh Shetty