Thread (17 messages) 17 messages, 4 authors, 2013-07-03

Re: [PATCH v2 net-next] net: convert lls to use time_in_range()

From: Ben Hutchings <hidden>
Date: 2013-07-02 20:43:06
Also in: lkml

On Tue, 2013-07-02 at 23:28 +0300, Eliezer Tamir wrote:
On 02/07/2013 23:10, Ben Hutchings wrote:
quoted
On Tue, 2013-07-02 at 12:49 +0300, Eliezer Tamir wrote:
quoted
Time in range will fail safely if we move to a different cpu with an
extremely large clock skew.
Add time_in_range64() and convert lls to use it.

Signed-off-by: Eliezer Tamir <redacted>
---
v1->v2
fixed double call to sched_clock() in can_poll_ll(), checkpatchisms
quoted
quoted
+#define time_in_range64(a, b, c) \
+	(time_after_eq64(a, b) && \
+	 time_before_eq64(a, c))
[...]

Why not make this an inline function, so the caller doesn't need to
worry about repeated evaluation?
I was following the conventions in jiffies.h
(well almost, I did add a few spaces to make checkpatch happy)
I see, but now you have a good reason to change that convention.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help