OSDN Git Service

Merge branch 'timer-add-fsleep-for-flexible-sleeping'
authorDavid S. Miller <davem@davemloft.net>
Thu, 7 May 2020 00:03:34 +0000 (17:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 May 2020 00:03:34 +0000 (17:03 -0700)
commita88845d862f2f8cc8e02fabc9491b96c238ac89b
tree6cf1bc43c66f49a9c343b3c5bce74fe124744669
parent969c54646af0d7d94a5f0f37adbbfe024e85466e
parentd6836ef02c1726c4c5f1cb712a9abdcd5f8fcd14
Merge branch 'timer-add-fsleep-for-flexible-sleeping'
Heiner Kallweit says:

====================
timer: add fsleep for flexible sleeping

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.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>