mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* ktime_set() does not check for nanoseconds > one second
@ 2008-09-01 10:38 Matt Fleming
  2008-09-01 11:20 ` Thomas Gleixner
  0 siblings, 1 reply; 7+ messages in thread
From: Matt Fleming @ 2008-09-01 10:38 UTC (permalink / raw)
  To: linux-kernel

Hi,

is it intentional that ktime_set() does not check whether the
nanoseconds argument is greater than the number of nanoseconds in a
second? I've run into a problem where a value of 1600000000
nanoseconds was passed as an argument to ktime_set() and the return
value was then used in a ktime_add() call, which returned an incorrect
result. Should the caller of ktime_set() make this check or is it
possible to move this logic in to the function itself?

Matt

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

end of thread, other threads:[~2008-09-01 13:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-01 10:38 ktime_set() does not check for nanoseconds > one second Matt Fleming
2008-09-01 11:20 ` Thomas Gleixner
2008-09-01 11:57   ` Matt Fleming
2008-09-01 13:06     ` Thomas Gleixner
2008-09-01 13:11       ` Matt Fleming
2008-09-01 13:16         ` Thomas Gleixner
2008-09-01 13:33           ` Matt Fleming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®