staging: lustre: remove cfs_task_state_t
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2013 00:48:26 +0000 (08:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2013 00:48:26 +0000 (08:48 +0800)
It's just a long, so remove the typedef and use long.

Side note, all the functions like waitq_* should be removed as well,
they are wrapping functions that don't really do what it seems that they
do based on their name.

Cc: Peng Tao <tao.peng@emc.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h
drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h
drivers/staging/lustre/lustre/libcfs/linux/linux-prim.c

index 6384f6c693ff2d8b334c4c6f0478000945a2f600..e6e417aeefd5b1859828f9f5f25be6eb8074c1f5 100644 (file)
@@ -49,11 +49,11 @@ void cfs_pause(cfs_duration_t ticks);
  * Timer
  */
 typedef  void (cfs_timer_func_t)(ulong_ptr_t);
-void schedule_timeout_and_set_state(cfs_task_state_t, int64_t);
+void schedule_timeout_and_set_state(long, int64_t);
 
 void init_waitqueue_entry_current(wait_queue_t *link);
-int64_t waitq_timedwait(wait_queue_t *, cfs_task_state_t, int64_t);
-void waitq_wait(wait_queue_t *, cfs_task_state_t);
+int64_t waitq_timedwait(wait_queue_t *, long, int64_t);
+void waitq_wait(wait_queue_t *, long);
 void add_wait_queue_exclusive_head(wait_queue_head_t *, wait_queue_t *);
 
 void cfs_init_timer(struct timer_list *t);
index 4b84feef05e2c5aff8629116834eb676b66636be..ae495a2ee434123accc85ebe13a272cb3c66ff26 100644 (file)
@@ -85,11 +85,6 @@ LL_PROC_PROTO(name)                               \
  */
 typedef struct proc_dir_entry     proc_dir_entry_t;
 
-/*
- * Wait Queue
- */
-typedef long                       cfs_task_state_t;
-
 /*
  * Task struct
  */
index 02e4466287a56aa2c0b9645d7c69583b2f1f1885..cc9829ffbdcbfaeab1f59118596c94f5aab44b17 100644 (file)
@@ -81,22 +81,21 @@ add_wait_queue_exclusive_head(wait_queue_head_t *waitq, wait_queue_t *link)
 EXPORT_SYMBOL(add_wait_queue_exclusive_head);
 
 void
-waitq_wait(wait_queue_t *link, cfs_task_state_t state)
+waitq_wait(wait_queue_t *link, long state)
 {
        schedule();
 }
 EXPORT_SYMBOL(waitq_wait);
 
 int64_t
-waitq_timedwait(wait_queue_t *link, cfs_task_state_t state,
-                   int64_t timeout)
+waitq_timedwait(wait_queue_t *link, long state, int64_t timeout)
 {
        return schedule_timeout(timeout);
 }
 EXPORT_SYMBOL(waitq_timedwait);
 
 void
-schedule_timeout_and_set_state(cfs_task_state_t state, int64_t timeout)
+schedule_timeout_and_set_state(long state, int64_t timeout)
 {
        set_current_state(state);
        schedule_timeout(timeout);