[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20220406085643.33100-2-wsa+renesas@sang-engineering.com>
Date: Wed, 6 Apr 2022 10:56:43 +0200
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
To: linux-kernel@...r.kernel.org,
Heiner Kallweit <hkallweit1@...il.com>
Cc: linux-renesas-soc@...r.kernel.org,
Greg KH <gregkh@...uxfoundation.org>,
David Miller <davem@...emloft.net>,
Wolfram Sang <wsa+renesas@...g-engineering.com>
Subject: [PATCH 1/1] delay: rename fsleep to usleep_autoyield
Rename fsleep because the current name breaks the pattern of the first
letter being a unit (and it is not 'femto' here). Let's add the proper
unit again and add a suffix to the function which will hopefully be a
bit more explanatory. To give some time until all users are converted,
introduce a fallback define which will go away later.
Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
---
Documentation/timers/timers-howto.rst | 2 +-
include/linux/delay.h | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Documentation/timers/timers-howto.rst b/Documentation/timers/timers-howto.rst
index 5c169e3d29a8..d0a57ca5e18e 100644
--- a/Documentation/timers/timers-howto.rst
+++ b/Documentation/timers/timers-howto.rst
@@ -112,4 +112,4 @@ NON-ATOMIC CONTEXT:
you know you have a need for the interruptible variant.
FLEXIBLE SLEEPING (any delay, uninterruptible)
- * Use fsleep
+ * Use usleep_autoyield
diff --git a/include/linux/delay.h b/include/linux/delay.h
index 039e7e0c7378..d0919f52fec8 100644
--- a/include/linux/delay.h
+++ b/include/linux/delay.h
@@ -78,7 +78,7 @@ static inline void ssleep(unsigned int seconds)
}
/* see Documentation/timers/timers-howto.rst for the thresholds */
-static inline void fsleep(unsigned long usecs)
+static inline void usleep_autoyield(unsigned long usecs)
{
if (usecs <= 10)
udelay(usecs);
@@ -88,4 +88,6 @@ static inline void fsleep(unsigned long usecs)
msleep(DIV_ROUND_UP(usecs, 1000));
}
+#define fsleep usleep_autoyield
+
#endif /* defined(_LINUX_DELAY_H) */
--
2.30.2
Powered by blists - more mailing lists