All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] timer: add fsleep for flexible sleeping
@ 2020-05-01 21:26 Heiner Kallweit
  2020-05-01 21:27 ` [PATCH net-next 1/2] " Heiner Kallweit
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Heiner Kallweit @ 2020-05-01 21:26 UTC (permalink / raw)
  To: Thomas Gleixner, Jonathan Corbet, Realtek linux nic maintainers,
	David Miller
  Cc: netdev, Linux Kernel Mailing List, linux-doc

Sleeping for a certain amount of time requires use of different
functions, depending on the time period.
Documentation/timers/timers-howto.rst explains when to use which
function, and also checkpatch checks for some potentially
problematic cases.

So let's create a helper that automatically chooses the appropriate
sleep function -> fsleep(), for flexible sleeping
Not sure why such a helper doesn't exist yet, or where the pitfall is,
because it's a quite obvious idea.

If the delay is a constant, then the compiler should be able to ensure
that the new helper doesn't create overhead. If the delay is not
constant, then the new helper can save some code.

First user is the r8169 network driver. If nothing speaks against it,
then this series could go through the netdev tree.

Heiner Kallweit (2):
  timer: add fsleep for flexible sleeping
  r8169: use fsleep in polling functions

 Documentation/timers/timers-howto.rst     |   3 +
 drivers/net/ethernet/realtek/r8169_main.c | 108 +++++++++-------------
 include/linux/delay.h                     |  11 +++
 3 files changed, 58 insertions(+), 64 deletions(-)

-- 
2.26.2


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

end of thread, other threads:[~2021-08-05 13:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-01 21:26 [PATCH net-next 0/2] timer: add fsleep for flexible sleeping Heiner Kallweit
2020-05-01 21:27 ` [PATCH net-next 1/2] " Heiner Kallweit
2021-08-05 13:06   ` Bjorn Helgaas
2020-05-01 21:29 ` [PATCH net-next 2/2] r8169: use fsleep in polling functions Heiner Kallweit
2020-05-07  0:04 ` [PATCH net-next 0/2] timer: add fsleep for flexible sleeping David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.