Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1392369
| From | Gustavo Padovan <gustavo@padovan.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 04/13] staging/android: remove sw_sync_timeline and sw_sync_pt |
| Date | 2016-05-02 18:40 +0200 |
| Message-ID | <rup35-6RX-23@gated-at.bofh.it> (permalink) |
| References | <runXl-5Ww-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
As we moved value storage to sync_timeline and fence those two structs
became useless and can be removed now.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
drivers/staging/android/sw_sync.c | 24 +++++++-----------------
drivers/staging/android/sw_sync.h | 24 ++++++------------------
drivers/staging/android/sync_debug.c | 12 ++++++------
3 files changed, 19 insertions(+), 41 deletions(-)
diff --git a/drivers/staging/android/sw_sync.c b/drivers/staging/android/sw_sync.c
index c5e92c6..461dbd9 100644
--- a/drivers/staging/android/sw_sync.c
+++ b/drivers/staging/android/sw_sync.c
@@ -25,31 +25,21 @@
#include "sw_sync.h"
-struct fence *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)
+struct fence *sw_sync_pt_create(struct sync_timeline *obj, u32 value)
{
- struct sw_sync_pt *pt;
-
- pt = (struct sw_sync_pt *)
- sync_pt_create(&obj->obj, sizeof(struct sw_sync_pt), value);
-
- pt->value = value;
-
- return (struct fence *)pt;
+ return sync_pt_create(obj, sizeof(struct fence), value);
}
EXPORT_SYMBOL(sw_sync_pt_create);
-struct sw_sync_timeline *sw_sync_timeline_create(const char *name)
+struct sync_timeline *sw_sync_timeline_create(const char *name)
{
- struct sw_sync_timeline *obj = (struct sw_sync_timeline *)
- sync_timeline_create(sizeof(struct sw_sync_timeline),
- "sw_sync", name);
-
- return obj;
+ return sync_timeline_create(sizeof(struct sync_timeline),
+ "sw_sync", name);
}
EXPORT_SYMBOL(sw_sync_timeline_create);
-void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)
+void sw_sync_timeline_inc(struct sync_timeline *obj, u32 inc)
{
- sync_timeline_signal(&obj->obj, inc);
+ sync_timeline_signal(obj, inc);
}
EXPORT_SYMBOL(sw_sync_timeline_inc);
diff --git a/drivers/staging/android/sw_sync.h b/drivers/staging/android/sw_sync.h
index e18667b..9f26c62 100644
--- a/drivers/staging/android/sw_sync.h
+++ b/drivers/staging/android/sw_sync.h
@@ -22,34 +22,22 @@
#include "sync.h"
#include "uapi/sw_sync.h"
-struct sw_sync_timeline {
- struct sync_timeline obj;
-
- u32 value;
-};
-
-struct sw_sync_pt {
- struct fence pt;
-
- u32 value;
-};
-
#if IS_ENABLED(CONFIG_SW_SYNC)
-struct sw_sync_timeline *sw_sync_timeline_create(const char *name);
-void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc);
+struct sync_timeline *sw_sync_timeline_create(const char *name);
+void sw_sync_timeline_inc(struct sync_timeline *obj, u32 inc);
-struct fence *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value);
+struct fence *sw_sync_pt_create(struct sync_timeline *obj, u32 value);
#else
-static inline struct sw_sync_timeline *sw_sync_timeline_create(const char *name)
+static inline struct sync_timeline *sw_sync_timeline_create(const char *name)
{
return NULL;
}
-static inline void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)
+static inline void sw_sync_timeline_inc(struct sync_timeline *obj, u32 inc)
{
}
-static inline struct fence *sw_sync_pt_create(struct sw_sync_timeline *obj,
+static inline struct fence *sw_sync_pt_create(struct sync_timeline *obj,
u32 value)
{
return NULL;
diff --git a/drivers/staging/android/sync_debug.c b/drivers/staging/android/sync_debug.c
index e5634f2..e207a4d 100644
--- a/drivers/staging/android/sync_debug.c
+++ b/drivers/staging/android/sync_debug.c
@@ -209,7 +209,7 @@ static const struct file_operations sync_info_debugfs_fops = {
/* opening sw_sync create a new sync obj */
static int sw_sync_debugfs_open(struct inode *inode, struct file *file)
{
- struct sw_sync_timeline *obj;
+ struct sync_timeline *obj;
char task_comm[TASK_COMM_LEN];
get_task_comm(task_comm, current);
@@ -225,13 +225,13 @@ static int sw_sync_debugfs_open(struct inode *inode, struct file *file)
static int sw_sync_debugfs_release(struct inode *inode, struct file *file)
{
- struct sw_sync_timeline *obj = file->private_data;
+ struct sync_timeline *obj = file->private_data;
- sync_timeline_destroy(&obj->obj);
+ sync_timeline_destroy(obj);
return 0;
}
-static long sw_sync_ioctl_create_fence(struct sw_sync_timeline *obj,
+static long sw_sync_ioctl_create_fence(struct sync_timeline *obj,
unsigned long arg)
{
int fd = get_unused_fd_flags(O_CLOEXEC);
@@ -277,7 +277,7 @@ err:
return err;
}
-static long sw_sync_ioctl_inc(struct sw_sync_timeline *obj, unsigned long arg)
+static long sw_sync_ioctl_inc(struct sync_timeline *obj, unsigned long arg)
{
u32 value;
@@ -292,7 +292,7 @@ static long sw_sync_ioctl_inc(struct sw_sync_timeline *obj, unsigned long arg)
static long sw_sync_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
- struct sw_sync_timeline *obj = file->private_data;
+ struct sync_timeline *obj = file->private_data;
switch (cmd) {
case SW_SYNC_IOC_CREATE_FENCE:
--
2.5.5
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 00/13] staging/android: clean up SW_SYNC Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 17:30 +0200
[PATCH 09/13] staging/android: bring struct sync_pt back Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 17:30 +0200
[PATCH 13/13] staging/android: make sw_ioctl info internal to sw_sync.c Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 17:30 +0200
[PATCH 07/13] staging/android: remove unnecessary check for fence Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 17:30 +0200
[PATCH 01/13] staging/android: store last signaled value on sync timeline Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 17:40 +0200
[PATCH 10/13] staging/android: move sw_sync related code to sw_sync.c Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 17:50 +0200
[PATCH 05/13] staging/android: remove sw_sync.[ch] files Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 17:50 +0200
[PATCH 12/13] staging/android: make sync_timeline internal to sw_sync Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 17:50 +0200
[PATCH 02/13] staging/android: remove .{fence,timeline}_value_str() from timeline_ops Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 18:20 +0200
[PATCH 06/13] staging/android: rename android_fence to timeline_fence Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 18:30 +0200
[PATCH 03/13] staging/android: remove struct sync_timeline_ops Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 18:30 +0200
[PATCH 04/13] staging/android: remove sw_sync_timeline and sw_sync_pt Gustavo Padovan <gustavo@padovan.org> - 2016-05-02 18:40 +0200
csiph-web