Commit a649ad1d authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

staging: lustre: remove cfs_time_t typedef



Just use unsigned long everywhere, like the rest of the kernel does.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: hpdd-discuss <hpdd-discuss@lists.01.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8718c63e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ struct ptldebug_header {
#define CDEBUG_DEFAULT_MIN_DELAY ((cfs_time_seconds(1) + 1) / 2) /* jiffies */
#define CDEBUG_DEFAULT_BACKOFF   2
struct cfs_debug_limit_state {
	cfs_time_t   cdls_next;
	unsigned long   cdls_next;
	unsigned int cdls_delay;
	int	     cdls_count;
};
+2 −2
Original line number Diff line number Diff line
@@ -50,10 +50,10 @@ void add_wait_queue_exclusive_head(wait_queue_head_t *, wait_queue_t *);
void cfs_init_timer(struct timer_list *t);
void cfs_timer_init(struct timer_list *t, cfs_timer_func_t *func, void *arg);
void cfs_timer_done(struct timer_list *t);
void cfs_timer_arm(struct timer_list *t, cfs_time_t deadline);
void cfs_timer_arm(struct timer_list *t, unsigned long deadline);
void cfs_timer_disarm(struct timer_list *t);
int  cfs_timer_is_armed(struct timer_list *t);
cfs_time_t cfs_timer_deadline(struct timer_list *t);
unsigned long cfs_timer_deadline(struct timer_list *t);

/*
 * Memory
+8 −8
Original line number Diff line number Diff line
@@ -43,27 +43,27 @@
 * generic time manipulation functions.
 */

static inline cfs_time_t cfs_time_add(cfs_time_t t, cfs_duration_t d)
static inline unsigned long cfs_time_add(unsigned long t, cfs_duration_t d)
{
	return (cfs_time_t)(t + d);
	return (unsigned long)(t + d);
}

static inline cfs_duration_t cfs_time_sub(cfs_time_t t1, cfs_time_t t2)
static inline cfs_duration_t cfs_time_sub(unsigned long t1, unsigned long t2)
{
	return (cfs_time_t)(t1 - t2);
	return (unsigned long)(t1 - t2);
}

static inline int cfs_time_after(cfs_time_t t1, cfs_time_t t2)
static inline int cfs_time_after(unsigned long t1, unsigned long t2)
{
	return cfs_time_before(t2, t1);
}

static inline int cfs_time_aftereq(cfs_time_t t1, cfs_time_t t2)
static inline int cfs_time_aftereq(unsigned long t1, unsigned long t2)
{
	return cfs_time_beforeq(t2, t1);
}

static inline cfs_time_t cfs_time_shift(int seconds)
static inline unsigned long cfs_time_shift(int seconds)
{
	return cfs_time_add(cfs_time_current(), cfs_time_seconds(seconds));
}
@@ -81,7 +81,7 @@ static inline long cfs_timeval_sub(struct timeval *large, struct timeval *small,
	return r;
}

static inline void cfs_slow_warning(cfs_time_t now, int seconds, char *msg)
static inline void cfs_slow_warning(unsigned long now, int seconds, char *msg)
{
	if (cfs_time_after(cfs_time_current(),
			   cfs_time_add(now, cfs_time_seconds(15))))
+9 −10
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@
/*
 * Platform provides three opaque data-types:
 *
 *  cfs_time_t	represents point in time. This is internal kernel
 *  unsigned long	represents point in time. This is internal kernel
 *		    time rather than "wall clock". This time bears no
 *		    relation to gettimeofday().
 *
@@ -60,11 +60,11 @@
 *  struct timespec     represents instance in world-visible time. This is
 *		    used in file-system time-stamps
 *
 *  cfs_time_t     cfs_time_current(void);
 *  cfs_time_t     cfs_time_add    (cfs_time_t, cfs_duration_t);
 *  cfs_duration_t cfs_time_sub    (cfs_time_t, cfs_time_t);
 *  int	    cfs_impl_time_before (cfs_time_t, cfs_time_t);
 *  int	    cfs_impl_time_before_eq(cfs_time_t, cfs_time_t);
 *  unsigned long     cfs_time_current(void);
 *  unsigned long     cfs_time_add    (unsigned long, cfs_duration_t);
 *  cfs_duration_t cfs_time_sub    (unsigned long, unsigned long);
 *  int	    cfs_impl_time_before (unsigned long, unsigned long);
 *  int	    cfs_impl_time_before_eq(unsigned long, unsigned long);
 *
 *  cfs_duration_t cfs_duration_build(int64_t);
 *
@@ -107,20 +107,19 @@ static inline void cfs_fs_time_usec(struct timespec *t, struct timeval *v)
 * Generic kernel stuff
 */

typedef unsigned long cfs_time_t;      /* jiffies */
typedef long cfs_duration_t;

static inline int cfs_time_before(cfs_time_t t1, cfs_time_t t2)
static inline int cfs_time_before(unsigned long t1, unsigned long t2)
{
	return time_before(t1, t2);
}

static inline int cfs_time_beforeq(cfs_time_t t1, cfs_time_t t2)
static inline int cfs_time_beforeq(unsigned long t1, unsigned long t2)
{
	return time_before_eq(t1, t2);
}

static inline cfs_time_t cfs_time_current(void)
static inline unsigned long cfs_time_current(void)
{
	return jiffies;
}
+2 −2
Original line number Diff line number Diff line
@@ -88,8 +88,8 @@ struct upcall_cache_entry {
	atomic_t	    ue_refcount;
	int		     ue_flags;
	wait_queue_head_t	     ue_waitq;
	cfs_time_t	      ue_acquire_expire;
	cfs_time_t	      ue_expire;
	unsigned long	      ue_acquire_expire;
	unsigned long	      ue_expire;
	union {
		struct md_identity     identity;
	} u;
Loading