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

Guo, Yejun yejun.guo at intel.com
Thu Nov 27 17:44:37 PST 2014


Ping for review, thanks.

-----Original Message-----
From: Guo, Yejun 
Sent: Monday, November 03, 2014 10:42 AM
To: beignet at lists.freedesktop.org
Cc: Guo, Yejun
Subject: [PATCH] clean code, the logic is already at the beginning of function

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