diff options
author | Greg Hackmann <ghackmann@google.com> | 2014-03-26 16:43:23 -0700 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-21 22:35:44 -0500 |
commit | 65a6d64634595e03a2bde7d171fb2a624452d5ba (patch) | |
tree | 5d0c3915662b6ac3bebfaf36b6206544a531b0aa /drivers | |
parent | 38f1da6acca86c00faf6758fd5f76abf9f92fc0c (diff) |
video: adf: ensure consistent alignment on userspace facing structs
64-bit types in structs create alignment problems when a 32-bit x86
userspace talks to an x86_64 kernel. In most cases the 64-bit types can
be replaced with 32-bit ones, since they're being used for fds and
should have been __s32 in the first place. For adf_vsync_event,
alignment can be enforced by making the timestamp an __aligned_u64.
Change-Id: I87cf73d8f57730bd7bb43ffce6b7b411eb0ff198
Signed-off-by: Greg Hackmann <ghackmann@google.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/adf/adf_fops.c | 4 | ||||
-rw-r--r-- | drivers/video/adf/adf_fops32.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/adf/adf_fops.c b/drivers/video/adf/adf_fops.c index abec58ea2ed8..7fbf33e1cb39 100644 --- a/drivers/video/adf/adf_fops.c +++ b/drivers/video/adf/adf_fops.c @@ -187,7 +187,7 @@ static int adf_buffer_import(struct adf_device *dev, buf->dma_bufs[i] = dma_buf_get(user_buf.fd[i]); if (IS_ERR(buf->dma_bufs[i])) { ret = PTR_ERR(buf->dma_bufs[i]); - dev_err(&dev->base.dev, "importing dma_buf fd %llu failed: %d\n", + dev_err(&dev->base.dev, "importing dma_buf fd %d failed: %d\n", user_buf.fd[i], ret); buf->dma_bufs[i] = NULL; goto done; @@ -200,7 +200,7 @@ static int adf_buffer_import(struct adf_device *dev, if (user_buf.acquire_fence >= 0) { buf->acquire_fence = sync_fence_fdget(user_buf.acquire_fence); if (!buf->acquire_fence) { - dev_err(&dev->base.dev, "getting fence fd %lld failed\n", + dev_err(&dev->base.dev, "getting fence fd %d failed\n", user_buf.acquire_fence); ret = -EINVAL; goto done; diff --git a/drivers/video/adf/adf_fops32.h b/drivers/video/adf/adf_fops32.h index 53d43f010208..64034ce33a6b 100644 --- a/drivers/video/adf/adf_fops32.h +++ b/drivers/video/adf/adf_fops32.h @@ -25,7 +25,7 @@ struct adf_post_config32 { compat_size_t custom_data_size; compat_uptr_t custom_data; - __s64 complete_fence; + __s32 complete_fence; }; struct adf_device_data32 { |