aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/include
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-12 00:27:46 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-12 00:27:46 -0700
commita649ad1d7b44d2b5da62eec804539bb221396570 (patch)
treedd03c366785989fd41ab413e27ea71d3dd37161a /drivers/staging/lustre/include
parentstaging: lustre: remove unused functions from linux-time.h (diff)
downloadlinux-dev-a649ad1d7b44d2b5da62eec804539bb221396570.tar.xz
linux-dev-a649ad1d7b44d2b5da62eec804539bb221396570.zip
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/include')
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h2
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h4
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs_time.h16
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h19
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/lucache.h4
-rw-r--r--drivers/staging/lustre/include/linux/lnet/lib-lnet.h4
-rw-r--r--drivers/staging/lustre/include/linux/lnet/lib-types.h12
7 files changed, 30 insertions, 31 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
index b43c9ad8fd15..30098f39181f 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
@@ -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;
};
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h
index 7cf34aa78f79..a38209506d6c 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h
@@ -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
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h
index 712ab1ab2f27..73c51e2fae75 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h
@@ -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))))
diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h
index cfc99de29162..cf29fc8213ba 100644
--- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h
+++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h
@@ -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;
}
diff --git a/drivers/staging/lustre/include/linux/libcfs/lucache.h b/drivers/staging/lustre/include/linux/libcfs/lucache.h
index 3350dcc0ca2a..5d6e1b9de206 100644
--- a/drivers/staging/lustre/include/linux/libcfs/lucache.h
+++ b/drivers/staging/lustre/include/linux/libcfs/lucache.h
@@ -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;
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
index e5c72eb49467..5e8ea222b49f 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
@@ -643,8 +643,8 @@ lnet_ni_t *lnet_nid2ni_locked(lnet_nid_t nid, int cpt);
lnet_ni_t *lnet_net2ni_locked(__u32 net, int cpt);
lnet_ni_t *lnet_net2ni(__u32 net);
-int lnet_notify(lnet_ni_t *ni, lnet_nid_t peer, int alive, cfs_time_t when);
-void lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive, cfs_time_t when);
+int lnet_notify(lnet_ni_t *ni, lnet_nid_t peer, int alive, unsigned long when);
+void lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive, unsigned long when);
int lnet_add_route(__u32 net, unsigned int hops, lnet_nid_t gateway_nid,
unsigned int priority);
int lnet_check_routes(void);
diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h b/drivers/staging/lustre/include/linux/lnet/lib-types.h
index 936b829b947a..f16213f1771a 100644
--- a/drivers/staging/lustre/include/linux/lnet/lib-types.h
+++ b/drivers/staging/lustre/include/linux/lnet/lib-types.h
@@ -362,7 +362,7 @@ typedef struct lnet_lnd {
void (*lnd_notify)(struct lnet_ni *ni, lnet_nid_t peer, int alive);
/* query of peer aliveness */
- void (*lnd_query)(struct lnet_ni *ni, lnet_nid_t peer, cfs_time_t *when);
+ void (*lnd_query)(struct lnet_ni *ni, lnet_nid_t peer, unsigned long *when);
/* accept a new connection */
int (*lnd_accept)(struct lnet_ni *ni, struct socket *sock);
@@ -457,11 +457,11 @@ typedef struct lnet_peer {
unsigned int lp_ping_notsent; /* SEND event outstanding from ping */
int lp_alive_count; /* # times router went dead<->alive */
long lp_txqnob; /* bytes queued for sending */
- cfs_time_t lp_timestamp; /* time of last aliveness news */
- cfs_time_t lp_ping_timestamp; /* time of last ping attempt */
- cfs_time_t lp_ping_deadline; /* != 0 if ping reply expected */
- cfs_time_t lp_last_alive; /* when I was last alive */
- cfs_time_t lp_last_query; /* when lp_ni was queried last time */
+ unsigned long lp_timestamp; /* time of last aliveness news */
+ unsigned long lp_ping_timestamp; /* time of last ping attempt */
+ unsigned long lp_ping_deadline; /* != 0 if ping reply expected */
+ unsigned long lp_last_alive; /* when I was last alive */
+ unsigned long lp_last_query; /* when lp_ni was queried last time */
lnet_ni_t *lp_ni; /* interface peer is on */
lnet_nid_t lp_nid; /* peer's NID */
int lp_refcount; /* # refs */