linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Converge on secs_to_jiffies()
@ 2024-10-28 19:11 Easwar Hariharan
  2024-10-28 19:11 ` [PATCH v2 1/2] jiffies: Define secs_to_jiffies() Easwar Hariharan
  2024-10-28 19:11 ` [PATCH v2 2/2] drivers: hv: Convert open-coded timeouts to secs_to_jiffies() Easwar Hariharan
  0 siblings, 2 replies; 10+ messages in thread
From: Easwar Hariharan @ 2024-10-28 19:11 UTC (permalink / raw)
  To: K. Y. Srinivasan, Haiyang Zhang, Wei Liu, Dexuan Cui,
	linux-hyperv, Anna-Maria Behnsen, Thomas Gleixner,
	Geert Uytterhoeven, Marcel Holtmann, Johan Hedberg,
	Luiz Augusto von Dentz, linux-bluetooth, linux-kernel
  Cc: Michael Kelley, Easwar Hariharan

There are ~1150 call sites for msecs_to_jiffies() that:
- Use a multiplier of 1000, or MSEC_PER_SEC, or
- have timeouts that are denominated in seconds, i.e. end in 000

There are yet more sites that use (secs * HZ). Provide secs_to_jiffies()
as a new member of the *_to_jiffies() family and convert a few instances
as a first user.

Signed-off-by: Easwar Hariharan <eahariha@linux.microsoft.com>
---
changelog:
v2:
- Add a cover letter
- Define secs_to_jiffies(s) as (s * HZ) instead of msecs_to_jiffies(s * MSEC_PER_SEC) (Anna-Maria)
v1: https://lore.kernel.org/all/20241022185353.2080021-1-eahariha@linux.microsoft.com/
- Move secs_to_jiffies in include/linux/jiffies.h
- Use secs_to_jiffies in drivers/hv
RFC: https://lore.kernel.org/all/20241016223730.531861-1-eahariha@linux.microsoft.com/
- Convert open coded timeouts (secs * HZ) in drivers/hv to msecs_to_jiffies()

---
Easwar Hariharan (2):
      jiffies: Define secs_to_jiffies()
      drivers: hv: Convert open-coded timeouts to secs_to_jiffies()

 drivers/hv/hv_balloon.c   | 9 +++++----
 drivers/hv/hv_kvp.c       | 4 ++--
 drivers/hv/hv_snapshot.c  | 3 ++-
 drivers/hv/vmbus_drv.c    | 2 +-
 include/linux/jiffies.h   | 2 ++
 net/bluetooth/hci_event.c | 2 --
 6 files changed, 12 insertions(+), 10 deletions(-)
---
base-commit: 81983758430957d9a5cb3333fe324fd70cf63e7e
change-id: 20241028-open-coded-timeouts-6dc7cbb6572d

Best regards,
-- 
Easwar Hariharan <eahariha@linux.microsoft.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-11-06 23:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-28 19:11 [PATCH v2 0/2] Converge on secs_to_jiffies() Easwar Hariharan
2024-10-28 19:11 ` [PATCH v2 1/2] jiffies: Define secs_to_jiffies() Easwar Hariharan
2024-10-28 19:25   ` Luiz Augusto von Dentz
2024-10-29 16:08   ` Thomas Gleixner
2024-10-29 16:22     ` Geert Uytterhoeven
2024-10-29 17:25       ` Thomas Gleixner
2024-10-29 21:35         ` Easwar Hariharan
2024-11-06 22:19         ` David Laight
2024-11-06 23:55           ` Thomas Gleixner
2024-10-28 19:11 ` [PATCH v2 2/2] drivers: hv: Convert open-coded timeouts to secs_to_jiffies() Easwar Hariharan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).