summaryrefslogtreecommitdiff
path: root/net/dccp
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-23 12:23:45 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-23 12:23:45 -0700
commitb0d19a378a409373244088511e889957645f2a44 (patch)
tree25275409eeea845f2e7617f12c8f28801ee4198f /net/dccp
parent0093cb1199ec551f179562ca9fbd6f64fb750645 (diff)
parentd7d313000ba2fc94a5383511a17ff38a39bab928 (diff)
downloadlinux-3.10-b0d19a378a409373244088511e889957645f2a44.tar.gz
linux-3.10-b0d19a378a409373244088511e889957645f2a44.tar.bz2
linux-3.10-b0d19a378a409373244088511e889957645f2a44.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: iwlwifi: Fix built-in compilation of iwlcore net: Unexport move_addr_to_{kernel,user} rt2x00: Select LEDS_CLASS. iwlwifi: Select LEDS_CLASS. leds: Do not guard NEW_LEDS with HAS_IOMEM [IPSEC]: Fix catch-22 with algorithm IDs above 31 time: Export set_normalized_timespec. tcp: Make use of before macro in tcp_input.c hamradio: Remove unneeded and deprecated cli()/sti() calls in dmascc.c [NETNS]: Remove empty ->init callback. [DCCP]: Convert do_gettimeofday() to getnstimeofday(). [NETNS]: Don't initialize err variable twice. [NETNS]: The ip6_fib_timer can work with garbage on net namespace stop. [IPV4]: Convert do_gettimeofday() to getnstimeofday(). [IPV4]: Make icmp_sk_init() static. [IPV6]: Make struct ip6_prohibit_entry_template static. tcp: Trivial fix to correct function name in a comment in net/ipv4/tcp.c [NET]: Expose netdevice dev_id through sysfs skbuff: fix missing kernel-doc notation [ROSE]: Fix soft lockup wrt. rose_node_list_lock
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/probe.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/net/dccp/probe.c b/net/dccp/probe.c
index 7053bb827bc..6e1df62bd7c 100644
--- a/net/dccp/probe.c
+++ b/net/dccp/probe.c
@@ -46,29 +46,24 @@ struct {
struct kfifo *fifo;
spinlock_t lock;
wait_queue_head_t wait;
- struct timeval tstart;
+ struct timespec tstart;
} dccpw;
static void printl(const char *fmt, ...)
{
va_list args;
int len;
- struct timeval now;
+ struct timespec now;
char tbuf[256];
va_start(args, fmt);
- do_gettimeofday(&now);
+ getnstimeofday(&now);
- now.tv_sec -= dccpw.tstart.tv_sec;
- now.tv_usec -= dccpw.tstart.tv_usec;
- if (now.tv_usec < 0) {
- --now.tv_sec;
- now.tv_usec += 1000000;
- }
+ now = timespec_sub(now, dccpw.tstart);
len = sprintf(tbuf, "%lu.%06lu ",
(unsigned long) now.tv_sec,
- (unsigned long) now.tv_usec);
+ (unsigned long) now.tv_nsec / NSEC_PER_USEC);
len += vscnprintf(tbuf+len, sizeof(tbuf)-len, fmt, args);
va_end(args);
@@ -119,7 +114,7 @@ static struct jprobe dccp_send_probe = {
static int dccpprobe_open(struct inode *inode, struct file *file)
{
kfifo_reset(dccpw.fifo);
- do_gettimeofday(&dccpw.tstart);
+ getnstimeofday(&dccpw.tstart);
return 0;
}