[Beignet] [PATCH] clean code, the logic is already at the beginning of function

Guo Yejun yejun.guo at intel.com
Sun Nov 2 18:41:30 PST 2014


Signed-off-by: Guo Yejun <yejun.guo at intel.com>
---
 src/cl_mem.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/src/cl_mem.c b/src/cl_mem.c
index 6162f7d..99784a8 100644
--- a/src/cl_mem.c
+++ b/src/cl_mem.c
@@ -378,22 +378,6 @@ cl_mem_new_buffer(cl_context ctx,
     goto error;
   }
 
-  /* CL_MEM_ALLOC_HOST_PTR and CL_MEM_USE_HOST_PTR
-     are mutually exclusive. */
-  if (UNLIKELY(flags & CL_MEM_ALLOC_HOST_PTR &&
-               flags & CL_MEM_USE_HOST_PTR)) {
-    err = CL_INVALID_HOST_PTR;
-    goto error;
-  }
-
-  /* CL_MEM_COPY_HOST_PTR and CL_MEM_USE_HOST_PTR
-     are mutually exclusive. */
-  if (UNLIKELY(flags & CL_MEM_COPY_HOST_PTR &&
-               flags & CL_MEM_USE_HOST_PTR)) {
-    err = CL_INVALID_HOST_PTR;
-    goto error;
-  }
-
   if ((err = cl_get_device_info(ctx->device,
                                 CL_DEVICE_MAX_MEM_ALLOC_SIZE,
                                 sizeof(max_mem_size),
-- 
2.1.0



More information about the Beignet mailing list