All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-kernel@vger.kernel.org, Heiner Kallweit <hkallweit1@gmail.com>
Cc: linux-renesas-soc@vger.kernel.org,
	Greg KH <gregkh@linuxfoundation.org>,
	David Miller <davem@davemloft.net>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: [PATCH 1/1] delay: rename fsleep to usleep_autoyield
Date: Wed,  6 Apr 2022 10:56:43 +0200	[thread overview]
Message-ID: <20220406085643.33100-2-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20220406085643.33100-1-wsa+renesas@sang-engineering.com>

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


      reply	other threads:[~2022-04-06 12:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06  8:56 [PATCH 0/1] delay: rename fsleep to usleep_autoyield Wolfram Sang
2022-04-06  8:56 ` Wolfram Sang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220406085643.33100-2-wsa+renesas@sang-engineering.com \
    --to=wsa+renesas@sang-engineering.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.