[PATCH v2 0/3] Converge on using secs_to_jiffies() part two
From: Easwar Hariharan
Date: Mon Feb 03 2025 - 18:50:48 EST
This is the second series (part 1*) that converts users of msecs_to_jiffies() that
either use the multiply pattern of either of:
- msecs_to_jiffies(N*1000) or
- msecs_to_jiffies(N*MSEC_PER_SEC)
where N is a constant or an expression, to avoid the multiplication.
The conversion is made with Coccinelle with the secs_to_jiffies() script
in scripts/coccinelle/misc. Attention is paid to what the best change
can be rather than restricting to what the tool provides.
Andrew has kindly agreed to take the series through mm.git modulo the
patches maintainers want to pick through their own trees.
This series is based on next-20250203
Signed-off-by: Easwar Hariharan <eahariha@xxxxxxxxxxxxxxxxxxx>
* https://lore.kernel.org/all/20241210-converge-secs-to-jiffies-v3-0-ddfefd7e9f2a@xxxxxxxxxxxxxxxxxxx/
---
Changes in v2:
- Remove unneeded range checks in rbd and libceph. While there, convert
some timeouts that should have been fixed in part 1. (Ilya)
- Fixup secs_to_jiffies.cocci to be a bit more verbose
- Link to v1: https://lore.kernel.org/r/20250128-converge-secs-to-jiffies-part-two-v1-0-9a6ecf0b2308@xxxxxxxxxxxxxxxxxxx
---
Easwar Hariharan (3):
coccinelle: misc: secs_to_jiffies: Patch expressions too
rbd: convert timeouts to secs_to_jiffies()
libceph: convert timeouts to secs_to_jiffies()
drivers/block/rbd.c | 8 +++-----
include/linux/ceph/libceph.h | 12 ++++++------
net/ceph/ceph_common.c | 18 ++++++------------
net/ceph/osd_client.c | 3 +--
scripts/coccinelle/misc/secs_to_jiffies.cocci | 10 ++++++++++
5 files changed, 26 insertions(+), 25 deletions(-)
---
base-commit: 00f3246adeeacbda0bd0b303604e46eb59c32e6e
change-id: 20241217-converge-secs-to-jiffies-part-two-f44017aa6f67
Best regards,
--
Easwar Hariharan <eahariha@xxxxxxxxxxxxxxxxxxx>