Patch "io_uring/napi: Remove unnecessary s64 cast" has been added to the 6.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    io_uring/napi: Remove unnecessary s64 cast

to the 6.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     io_uring-napi-remove-unnecessary-s64-cast.patch
and it can be found in the queue-6.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9cb90798c9697b260a16853a0357db2494ff5b6d
Author: Thorsten Blum <thorsten.blum@xxxxxxxxxx>
Date:   Wed Jul 10 03:05:21 2024 +0200

    io_uring/napi: Remove unnecessary s64 cast
    
    [ Upstream commit f7c696a56cc7d70515774a24057b473757ec6089 ]
    
    Since the do_div() macro casts the divisor to u32 anyway, remove the
    unnecessary s64 cast and fix the following Coccinelle/coccicheck
    warning reported by do_div.cocci:
    
      WARNING: do_div() does a 64-by-32 division, please consider using div64_s64 instead
    
    Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240710010520.384009-2-thorsten.blum@xxxxxxxxxx
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Stable-dep-of: 84f2eecf9501 ("io_uring/napi: check napi_enabled in io_napi_add() before proceeding")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/io_uring/napi.c b/io_uring/napi.c
index 080d10e0e0afd..327e5f3a8abe0 100644
--- a/io_uring/napi.c
+++ b/io_uring/napi.c
@@ -285,7 +285,7 @@ void __io_napi_adjust_timeout(struct io_ring_ctx *ctx, struct io_wait_queue *iow
 			s64 poll_to_ns = timespec64_to_ns(ts);
 			if (poll_to_ns > 0) {
 				u64 val = poll_to_ns + 999;
-				do_div(val, (s64) 1000);
+				do_div(val, 1000);
 				poll_to = val;
 			}
 		}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux