All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] delay: rename fsleep to usleep_autoyield
@ 2022-04-06  8:56 Wolfram Sang
  2022-04-06  8:56 ` [PATCH 1/1] " Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfram Sang @ 2022-04-06  8:56 UTC (permalink / raw)
  To: linux-kernel, Heiner Kallweit
  Cc: linux-renesas-soc, Greg KH, David Miller, Wolfram Sang

I recently stumbled over the relatively new function fsleep(). While I
think it is usful, I also think the name is too short to be
self-explanatory. This is why I suggest a rename before it gets even
wider use in the kernel. Once this rename is upstream, I will convert
the users. The churn is still in the acceptable range with 12 patches
and 70 lines changed IMO.

The name 'usleep_autoyield' is the best I could come up with, but if you
can think of something better I am all ears.

Please let me know what you think!

All the best,

   Wolfram


Wolfram Sang (1):
  delay: rename fsleep to usleep_autoyield

 Documentation/timers/timers-howto.rst | 2 +-
 include/linux/delay.h                 | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

-- 
2.30.2


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

* [PATCH 1/1] delay: rename fsleep to usleep_autoyield
  2022-04-06  8:56 [PATCH 0/1] delay: rename fsleep to usleep_autoyield Wolfram Sang
@ 2022-04-06  8:56 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2022-04-06  8:56 UTC (permalink / raw)
  To: linux-kernel, Heiner Kallweit
  Cc: linux-renesas-soc, Greg KH, David Miller, Wolfram Sang

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@sang-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


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

end of thread, other threads:[~2022-04-06 12:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-06  8:56 [PATCH 0/1] delay: rename fsleep to usleep_autoyield Wolfram Sang
2022-04-06  8:56 ` [PATCH 1/1] " Wolfram Sang

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.