From: Johannes Berg <johannes@sipsolutions.net>
To: backports@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>
Subject: [PATCH 3/3] backports: add ktime_get_coarse_boottime_ns
Date: Mon, 21 Feb 2022 15:11:47 +0100 [thread overview]
Message-ID: <20220221151147.3fccada91a71.Id1c6b53e4c57d92eb838e4c09ef8042cd42f150f@changeid> (raw)
In-Reply-To: <20220221151147.f0ab663b932a.I59271805ee60501a03c50f5ec05240393f1fb4be@changeid>
From: Johannes Berg <johannes.berg@intel.com>
... and simplify the code while at it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
backport/backport-include/linux/timekeeping.h | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/backport/backport-include/linux/timekeeping.h b/backport/backport-include/linux/timekeeping.h
index 80c625569d6e..87744572bce6 100644
--- a/backport/backport-include/linux/timekeeping.h
+++ b/backport/backport-include/linux/timekeeping.h
@@ -6,23 +6,18 @@
#include_next <linux/timekeeping.h>
#if LINUX_VERSION_IS_LESS(5,3,0)
-#define ktime_get_boottime_ns LINUX_BACKPORT(ktime_get_boottime_ns)
-static inline u64 ktime_get_boottime_ns(void)
-{
- return ktime_get_boot_ns();
-}
+#define ktime_get_boottime_ns ktime_get_boot_ns
+#define ktime_get_coarse_boottime_ns ktime_get_boot_ns
#endif /* < 5.3 */
#if LINUX_VERSION_IS_LESS(4,18,0)
extern time64_t ktime_get_boottime_seconds(void);
-#endif /* < 4.18 */
-#if LINUX_VERSION_IS_LESS(4,18,0)
#define ktime_get_raw_ts64 LINUX_BACKPORT(ktime_get_raw_ts64)
static inline void ktime_get_raw_ts64(struct timespec64 *ts)
{
return getrawmonotonic64(ts);
}
-#endif
+#endif /* < 4.18 */
#endif /* __BACKPORT_TIMEKEEPING_H */
--
2.35.1
--
To unsubscribe from this list: send the line "unsubscribe backports" in
prev parent reply other threads:[~2022-02-21 14:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 14:11 [PATCH 1/3] backports: stub structs but remove ndo_fill_forward_path Johannes Berg
2022-02-21 14:11 ` [PATCH 2/3] backports: add memset_after/memset_startat Johannes Berg
2022-02-21 14:11 ` Johannes Berg [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=20220221151147.3fccada91a71.Id1c6b53e4c57d92eb838e4c09ef8042cd42f150f@changeid \
--to=johannes@sipsolutions.net \
--cc=backports@vger.kernel.org \
--cc=johannes.berg@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).