diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2015-04-02 05:39:45 -0400 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2015-08-05 08:01:11 -0400 |
commit | b9eb1a6174e58eb8beea664ffc20d152230d8004 (patch) | |
tree | c95ea95353e27545018d56b7b17f6f0cce2e5d48 /drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | |
parent | f6b05004538ab0933c7527f10a2a6ed88c620f99 (diff) |
drm/vmwgfx: Kill a bunch of sparse warnings
We're giving up all attempts to keep cpu- and device byte ordering separate.
This silences sparse when compiled using
make C=2 CF="-D__CHECK_ENDIAN__"
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c index 64dba53ca54c..40fdd0258664 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | |||
@@ -1850,7 +1850,7 @@ static int vmw_cmd_check_not_3d(struct vmw_private *dev_priv, | |||
1850 | uint32_t size_remaining = *size; | 1850 | uint32_t size_remaining = *size; |
1851 | uint32_t cmd_id; | 1851 | uint32_t cmd_id; |
1852 | 1852 | ||
1853 | cmd_id = le32_to_cpu(((uint32_t *)buf)[0]); | 1853 | cmd_id = ((uint32_t *)buf)[0]; |
1854 | switch (cmd_id) { | 1854 | switch (cmd_id) { |
1855 | case SVGA_CMD_UPDATE: | 1855 | case SVGA_CMD_UPDATE: |
1856 | *size = sizeof(uint32_t) + sizeof(SVGAFifoCmdUpdate); | 1856 | *size = sizeof(uint32_t) + sizeof(SVGAFifoCmdUpdate); |
@@ -2066,14 +2066,14 @@ static int vmw_cmd_check(struct vmw_private *dev_priv, | |||
2066 | const struct vmw_cmd_entry *entry; | 2066 | const struct vmw_cmd_entry *entry; |
2067 | bool gb = dev_priv->capabilities & SVGA_CAP_GBOBJECTS; | 2067 | bool gb = dev_priv->capabilities & SVGA_CAP_GBOBJECTS; |
2068 | 2068 | ||
2069 | cmd_id = le32_to_cpu(((uint32_t *)buf)[0]); | 2069 | cmd_id = ((uint32_t *)buf)[0]; |
2070 | /* Handle any none 3D commands */ | 2070 | /* Handle any none 3D commands */ |
2071 | if (unlikely(cmd_id < SVGA_CMD_MAX)) | 2071 | if (unlikely(cmd_id < SVGA_CMD_MAX)) |
2072 | return vmw_cmd_check_not_3d(dev_priv, sw_context, buf, size); | 2072 | return vmw_cmd_check_not_3d(dev_priv, sw_context, buf, size); |
2073 | 2073 | ||
2074 | 2074 | ||
2075 | cmd_id = le32_to_cpu(header->id); | 2075 | cmd_id = header->id; |
2076 | *size = le32_to_cpu(header->size) + sizeof(SVGA3dCmdHeader); | 2076 | *size = header->size + sizeof(SVGA3dCmdHeader); |
2077 | 2077 | ||
2078 | cmd_id -= SVGA_3D_CMD_BASE; | 2078 | cmd_id -= SVGA_3D_CMD_BASE; |
2079 | if (unlikely(*size > size_remaining)) | 2079 | if (unlikely(*size > size_remaining)) |
@@ -2499,11 +2499,11 @@ static int vmw_execbuf_submit_cmdbuf(struct vmw_private *dev_priv, | |||
2499 | * If the function is interrupted by a signal while sleeping, it will return | 2499 | * If the function is interrupted by a signal while sleeping, it will return |
2500 | * -ERESTARTSYS casted to a pointer error value. | 2500 | * -ERESTARTSYS casted to a pointer error value. |
2501 | */ | 2501 | */ |
2502 | void *vmw_execbuf_cmdbuf(struct vmw_private *dev_priv, | 2502 | static void *vmw_execbuf_cmdbuf(struct vmw_private *dev_priv, |
2503 | void __user *user_commands, | 2503 | void __user *user_commands, |
2504 | void *kernel_commands, | 2504 | void *kernel_commands, |
2505 | u32 command_size, | 2505 | u32 command_size, |
2506 | struct vmw_cmdbuf_header **header) | 2506 | struct vmw_cmdbuf_header **header) |
2507 | { | 2507 | { |
2508 | size_t cmdbuf_size; | 2508 | size_t cmdbuf_size; |
2509 | int ret; | 2509 | int ret; |