lkml.org 
[lkml]   [2016]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 06/11] staging/android: turn fence_info into a __u64 pointer
Date
From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

Turn sync_fence_info into __u64 type enable us to extend the struct in the
future without breaking the ABI.

v2: use type __u64 for fence_info

v3: fix commit message to reflect the v2 change

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
drivers/staging/android/sync.c | 2 +-
drivers/staging/android/uapi/sync.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index 2ab0c20..8425457 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -525,7 +525,7 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
if (info->status >= 0)
info->status = !info->status;

- len = sizeof(struct sync_file_info);
+ len = sizeof(struct sync_file_info) - sizeof(__u64);

for (i = 0; i < sync_file->num_fences; ++i) {
struct fence *fence = sync_file->cbs[i].fence;
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index a0cf357..e649953 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -54,7 +54,7 @@ struct sync_file_info {
char name[32];
__s32 status;

- __u8 sync_fence_info[0];
+ __u64 sync_fence_info;
};

#define SYNC_IOC_MAGIC '>'
--
2.5.0
\
 
 \ /
  Last update: 2016-02-03 15:21    [W:0.136 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site