Hi Oriol,

you forgot to run checkpatch.pl before sending:

perl ./scripts/checkpatch.pl 0001-linux-generic-helper-api-fix-type-casting-for-C-incl.patch
CHECK: No space is necessary after a cast
#24: FILE: helper/include/odp/helper/chksum.h:47:
+    uint16_t *buf = (uint16_t*) buffer;

ERROR: "(foo*)" should be "(foo *)"
#24: FILE: helper/include/odp/helper/chksum.h:47:
+    uint16_t *buf = (uint16_t*) buffer;

total: 1 errors, 0 warnings, 1 checks, 8 lines checked


BR,
Maxim.

On 06/07/16 13:18, Oriol Arcas wrote:
Helper's chksum.h API had a void* to uint16_t* casting, which is not
legal in C++ (Clang and GCC).

Signed-off-by: Oriol Arcas <or...@starflownetworks.com>
Reviewed-by: Bill Fischofer <bill.fischo...@linaro.org>
---
  helper/include/odp/helper/chksum.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/helper/include/odp/helper/chksum.h 
b/helper/include/odp/helper/chksum.h
index 07d0be3..5e0c969 100644
--- a/helper/include/odp/helper/chksum.h
+++ b/helper/include/odp/helper/chksum.h
@@ -44,7 +44,7 @@ typedef enum {
   */
  static inline odp_u16sum_t odph_chksum(void *buffer, int len)
  {
-       uint16_t *buf = buffer;
+       uint16_t *buf = (uint16_t*) buffer;
        uint32_t sum = 0;
        uint16_t result;

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to