staging/android: sync: remove interfaces that are not used
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Thu, 21 Jan 2016 12:49:15 +0000 (10:49 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 01:34:58 +0000 (17:34 -0800)
These interfaces are not used nor have plans to be used in the near
future so remove them for a cleaner solution before de-staging the sync
framework.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/sync.c
drivers/staging/android/sync.h
drivers/staging/android/sync_debug.c

index ed43796b5b582ddee27c86d659aa6503faee4de3..7a84f8853a8ed6180444c6228d32bc6ed080d158 100644 (file)
@@ -317,62 +317,6 @@ struct sync_fence *sync_fence_merge(const char *name,
 }
 EXPORT_SYMBOL(sync_fence_merge);
 
-int sync_fence_wake_up_wq(wait_queue_t *curr, unsigned mode,
-                         int wake_flags, void *key)
-{
-       struct sync_fence_waiter *wait;
-
-       wait = container_of(curr, struct sync_fence_waiter, work);
-       list_del_init(&wait->work.task_list);
-
-       wait->callback(wait->work.private, wait);
-       return 1;
-}
-
-int sync_fence_wait_async(struct sync_fence *fence,
-                         struct sync_fence_waiter *waiter)
-{
-       int err = atomic_read(&fence->status);
-       unsigned long flags;
-
-       if (err < 0)
-               return err;
-
-       if (!err)
-               return 1;
-
-       init_waitqueue_func_entry(&waiter->work, sync_fence_wake_up_wq);
-       waiter->work.private = fence;
-
-       spin_lock_irqsave(&fence->wq.lock, flags);
-       err = atomic_read(&fence->status);
-       if (err > 0)
-               __add_wait_queue_tail(&fence->wq, &waiter->work);
-       spin_unlock_irqrestore(&fence->wq.lock, flags);
-
-       if (err < 0)
-               return err;
-
-       return !err;
-}
-EXPORT_SYMBOL(sync_fence_wait_async);
-
-int sync_fence_cancel_async(struct sync_fence *fence,
-                           struct sync_fence_waiter *waiter)
-{
-       unsigned long flags;
-       int ret = 0;
-
-       spin_lock_irqsave(&fence->wq.lock, flags);
-       if (!list_empty(&waiter->work.task_list))
-               list_del_init(&waiter->work.task_list);
-       else
-               ret = -ENOENT;
-       spin_unlock_irqrestore(&fence->wq.lock, flags);
-       return ret;
-}
-EXPORT_SYMBOL(sync_fence_cancel_async);
-
 int sync_fence_wait(struct sync_fence *fence, long timeout)
 {
        long ret;
index 7a4d8209bb0b992b27d133db9ba9bddb085b8a73..e0865b94c8f7417db77d08a7f84ebd8a0e44e664 100644 (file)
@@ -159,27 +159,6 @@ struct sync_fence {
        struct sync_fence_cb    cbs[];
 };
 
-struct sync_fence_waiter;
-typedef void (*sync_callback_t)(struct sync_fence *fence,
-                               struct sync_fence_waiter *waiter);
-
-/**
- * struct sync_fence_waiter - metadata for asynchronous waiter on a fence
- * @work:              wait_queue for the fence waiter
- * @callback:          function pointer to call when fence signals
- */
-struct sync_fence_waiter {
-       wait_queue_t work;
-       sync_callback_t callback;
-};
-
-static inline void sync_fence_waiter_init(struct sync_fence_waiter *waiter,
-                                         sync_callback_t callback)
-{
-       INIT_LIST_HEAD(&waiter->work.task_list);
-       waiter->callback = callback;
-}
-
 /*
  * API for sync_timeline implementers
  */
@@ -303,33 +282,6 @@ void sync_fence_put(struct sync_fence *fence);
  */
 void sync_fence_install(struct sync_fence *fence, int fd);
 
-/**
- * sync_fence_wait_async() - registers and async wait on the fence
- * @fence:             fence to wait on
- * @waiter:            waiter callback struck
- *
- * Registers a callback to be called when @fence signals or has an error.
- * @waiter should be initialized with sync_fence_waiter_init().
- *
- * Returns 1 if @fence has already signaled, 0 if not or <0 if error.
- */
-int sync_fence_wait_async(struct sync_fence *fence,
-                         struct sync_fence_waiter *waiter);
-
-/**
- * sync_fence_cancel_async() - cancels an async wait
- * @fence:             fence to wait on
- * @waiter:            waiter callback struck
- *
- * Cancels a previously registered async wait.  Will fail gracefully if
- * @waiter was never registered or if @fence has already signaled @waiter.
- *
- * Returns 0 if waiter was removed from fence's async waiter list.
- * Returns -ENOENT if waiter was not found on fence's async waiter list.
- */
-int sync_fence_cancel_async(struct sync_fence *fence,
-                           struct sync_fence_waiter *waiter);
-
 /**
  * sync_fence_wait() - wait on fence
  * @fence:     fence to wait on
@@ -357,7 +309,5 @@ void sync_dump(void);
 # define sync_fence_debug_remove(fence)
 # define sync_dump()
 #endif
-int sync_fence_wake_up_wq(wait_queue_t *curr, unsigned mode,
-                                int wake_flags, void *key);
 
 #endif /* _LINUX_SYNC_H */
index 02a1649a1bd9f9571fe75b8c6d8d829f27763e1b..c7ee98f3b851853f676d47e605eeddfd3c0d8ba3 100644 (file)
@@ -151,8 +151,6 @@ static void sync_print_obj(struct seq_file *s, struct sync_timeline *obj)
 
 static void sync_print_fence(struct seq_file *s, struct sync_fence *fence)
 {
-       wait_queue_t *pos;
-       unsigned long flags;
        int i;
 
        seq_printf(s, "[%p] %s: %s\n", fence, fence->name,
@@ -160,19 +158,6 @@ static void sync_print_fence(struct seq_file *s, struct sync_fence *fence)
 
        for (i = 0; i < fence->num_fences; ++i)
                sync_print_pt(s, fence->cbs[i].sync_pt, true);
-
-       spin_lock_irqsave(&fence->wq.lock, flags);
-       list_for_each_entry(pos, &fence->wq.task_list, task_list) {
-               struct sync_fence_waiter *waiter;
-
-               if (pos->func != &sync_fence_wake_up_wq)
-                       continue;
-
-               waiter = container_of(pos, struct sync_fence_waiter, work);
-
-               seq_printf(s, "waiter %pF\n", waiter->callback);
-       }
-       spin_unlock_irqrestore(&fence->wq.lock, flags);
 }
 
 static int sync_debugfs_show(struct seq_file *s, void *unused)