netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v3 1/2] ktime: helpers to convert between ktime and jiffies
@ 2018-06-11 13:44 Tejaswi Tanikella
  2018-06-11 13:46 ` [PATCH net v3 2/2] ipv4: igmp: use alarmtimer to prevent delayed reports Tejaswi Tanikella
  0 siblings, 1 reply; 3+ messages in thread
From: Tejaswi Tanikella @ 2018-06-11 13:44 UTC (permalink / raw)
  To: netdev, f.fainelli; +Cc: andrew, davem

Signed-off-by: Tejaswi Tanikella <tejaswit@codeaurora.org>
---
v2: use alarmtimer instead of wakelock.
v3: add patches in the right order.
---
 include/linux/ktime.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index 5b9fddb..4881483 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -96,6 +96,10 @@ static inline ktime_t timeval_to_ktime(struct timeval tv)
 /* Convert ktime_t to nanoseconds - NOP in the scalar storage format: */
 #define ktime_to_ns(kt)			(kt)
 
+/* ktime to jiffies and back */
+#define ktime_to_jiffies(kt)		nsecs_to_jiffies(kt)
+#define jiffies_to_ktime(j)		jiffies_to_nsecs(j)
+
 /**
  * ktime_compare - Compares two ktime_t variables for less, greater or equal
  * @cmp1:	comparable1
-- 
1.9.1

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

end of thread, other threads:[~2018-06-20  5:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-11 13:44 [PATCH net v3 1/2] ktime: helpers to convert between ktime and jiffies Tejaswi Tanikella
2018-06-11 13:46 ` [PATCH net v3 2/2] ipv4: igmp: use alarmtimer to prevent delayed reports Tejaswi Tanikella
2018-06-20  5:09   ` kbuild test robot

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 NNTP newsgroup(s).