diff options
author | Emil Velikov <[email protected]> | 2015-10-28 12:50:47 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-10-30 17:37:09 +0000 |
commit | 7154d48c6e02c6cb29d877a3fac9de98f7cb1b4a (patch) | |
tree | 6c2bbd49de57d2394a9a123b0b7d603c8c688d3e /src/gallium/winsys | |
parent | bdcb005788f1fb1cb47c5c658d0a25db60b1e0d2 (diff) |
winsys/virgl: remove temporary ret variable
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/virgl/drm/virgl_drm_winsys.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c index d9b4d5810e6..0616de31309 100644 --- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c +++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c @@ -236,7 +236,6 @@ virgl_bo_transfer_put(struct virgl_winsys *vws, { struct virgl_drm_winsys *vdws = virgl_drm_winsys(vws); struct drm_virtgpu_3d_transfer_to_host tohostcmd; - int ret; memset(&tohostcmd, 0, sizeof(tohostcmd)); tohostcmd.bo_handle = res->bo_handle; @@ -245,8 +244,7 @@ virgl_bo_transfer_put(struct virgl_winsys *vws, tohostcmd.level = level; // tohostcmd.stride = stride; // tohostcmd.layer_stride = stride; - ret = drmIoctl(vdws->fd, DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST, &tohostcmd); - return ret; + return drmIoctl(vdws->fd, DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST, &tohostcmd); } static int @@ -258,7 +256,6 @@ virgl_bo_transfer_get(struct virgl_winsys *vws, { struct virgl_drm_winsys *vdws = virgl_drm_winsys(vws); struct drm_virtgpu_3d_transfer_from_host fromhostcmd; - int ret; memset(&fromhostcmd, 0, sizeof(fromhostcmd)); fromhostcmd.bo_handle = res->bo_handle; @@ -267,8 +264,7 @@ virgl_bo_transfer_get(struct virgl_winsys *vws, // fromhostcmd.stride = stride; // fromhostcmd.layer_stride = layer_stride; fromhostcmd.box = *(struct drm_virtgpu_3d_box *)box; - ret = drmIoctl(vdws->fd, DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST, &fromhostcmd); - return ret; + return drmIoctl(vdws->fd, DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST, &fromhostcmd); } static struct virgl_hw_res *virgl_drm_winsys_resource_cache_create(struct virgl_winsys *qws, @@ -651,15 +647,13 @@ static int virgl_drm_get_caps(struct virgl_winsys *vws, struct virgl_drm_caps *c { struct virgl_drm_winsys *vdws = virgl_drm_winsys(vws); struct drm_virtgpu_get_caps args; - int ret; memset(&args, 0, sizeof(args)); args.cap_set_id = 1; args.addr = (unsigned long)&caps->caps; args.size = sizeof(union virgl_caps); - ret = drmIoctl(vdws->fd, DRM_IOCTL_VIRTGPU_GET_CAPS, &args); - return ret; + return drmIoctl(vdws->fd, DRM_IOCTL_VIRTGPU_GET_CAPS, &args); } #define PTR_TO_UINT(x) ((unsigned)((intptr_t)(x))) |