[Beignet] [PATCH] Runtime: fix the incorrect platform info size (conformance).

Yang, Rong R rong.r.yang at intel.com
Fri Aug 30 01:37:44 PDT 2013


LGTM. Test ok, get correct length.

-----Original Message-----
From: beignet-bounces+rong.r.yang=intel.com at lists.freedesktop.org [mailto:beignet-bounces+rong.r.yang=intel.com at lists.freedesktop.org] On Behalf Of Zhigang Gong
Sent: Wednesday, August 28, 2013 4:54 PM
To: beignet at lists.freedesktop.org
Cc: Zhigang Gong
Subject: [Beignet] [PATCH] Runtime: fix the incorrect platform info size (conformance).

As sizeof(str) already includes the '\0', we should not add 1 on the return size. Conformance case computeinfo could pass with this patch.

(28-Aug 16:51:00)     BEGIN  Compute Info                            :
           ==>  CL_DEVICE_ERROR_CORRECTION_SUPPORT == 0
           ==>  CL_DEVICE_ERROR_CORRECTION_SUPPORT == 0
           ==>  CL_DEVICE_ERROR_CORRECTION_SUPPORT == 0
               PASSED computeinfo.

Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
---
 src/cl_platform_id.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cl_platform_id.c b/src/cl_platform_id.c index 33915ce..fdf0d78 100644
--- a/src/cl_platform_id.c
+++ b/src/cl_platform_id.c
@@ -28,7 +28,7 @@
 
 #define DECL_INFO_STRING(FIELD, STRING) \
     .FIELD = STRING,                    \
-    .JOIN(FIELD,_sz) = sizeof(STRING) + 1,
+    .JOIN(FIELD,_sz) = sizeof(STRING),
 
 static struct _cl_platform_id intel_platform_data = {
   INIT_ICD(dispatch)
--
1.7.9.5

_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list