On Wed, 2008-06-25 at 11:58 -0400, Pavel Roskin wrote: > > + unsigned long mid_range = (-1) / 2 + 1; > > What is that? I guess that's where Riemann's zeta function has its > non-trivial roots :-) The Pavel hypothesis: "The Riemann hypothesis is correct when calculated in 32-bit integers" is obviously wrong ;) > > + time_diff = jiffies - bss->last_update > mid_range ? > > + jiffies - bss->last_update : > > + bss->last_update - jiffies; > > That's pretty hairy. Do we really lack a function to calculate time > difference? Actually, come to think of it, isn't just doing the difference as in teh original patch correct in 32-bit unsigned integers? It'll wrap around a bit but that's ok, no? johannes
Attachment:
signature.asc
Description: This is a digitally signed message part