Skip to content

Commit

Permalink
[DCCP]: Nuke the timeval helpers now that we fully converted to ktime_t
Browse files Browse the repository at this point in the history
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Arnaldo Carvalho de Melo authored and David S. Miller committed Oct 10, 2007
1 parent 8fb8354 commit 6168b96
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions net/dccp/dccp.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,45 +402,6 @@ extern int dccp_insert_option(struct sock *sk, struct sk_buff *skb,
unsigned char option,
const void *value, unsigned char len);

static inline suseconds_t timeval_usecs(const struct timeval *tv)
{
return tv->tv_sec * USEC_PER_SEC + tv->tv_usec;
}

static inline suseconds_t timeval_delta(const struct timeval *large,
const struct timeval *small)
{
time_t secs = large->tv_sec - small->tv_sec;
suseconds_t usecs = large->tv_usec - small->tv_usec;

if (usecs < 0) {
secs--;
usecs += USEC_PER_SEC;
}
return secs * USEC_PER_SEC + usecs;
}

static inline void timeval_add_usecs(struct timeval *tv,
const suseconds_t usecs)
{
tv->tv_usec += usecs;
while (tv->tv_usec >= USEC_PER_SEC) {
tv->tv_sec++;
tv->tv_usec -= USEC_PER_SEC;
}
}

static inline void timeval_sub_usecs(struct timeval *tv,
const suseconds_t usecs)
{
tv->tv_usec -= usecs;
while (tv->tv_usec < 0) {
tv->tv_sec--;
tv->tv_usec += USEC_PER_SEC;
}
DCCP_BUG_ON(tv->tv_sec < 0);
}

#ifdef CONFIG_SYSCTL
extern int dccp_sysctl_init(void);
extern void dccp_sysctl_exit(void);
Expand Down

0 comments on commit 6168b96

Please sign in to comment.