From 557c5cbde374172c7140bc6a7cef2cc81e5a29dc Mon Sep 17 00:00:00 2001 From: Jerin Jacob Date: Tue, 11 Jun 2019 19:45:03 +0530 Subject: [PATCH] acl: fix build with some arm64 compiler Some compilers reporting the following error, though the existing code doesn't have any uninitialized variable case. Just to make compiler happy, initialize the int32x4_t variable one shot using vdupq_n_s32. lib/librte_acl/acl_run_neon.h: In function 'search_neon_4' lib/librte_acl/acl_run_neon.h:230:12: error: 'input' may be used uninitialized in this function int32x4_t input; Fixes: 34fa6c27c156 ("acl: add NEON optimization for ARMv8") Cc: stable@dpdk.org Suggested-by: Honnappa Nagarahalli Signed-off-by: Jerin Jacob Acked-by: Aaron Conole --- lib/librte_acl/acl_run_neon.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_acl/acl_run_neon.h b/lib/librte_acl/acl_run_neon.h index 01b9766d8b..b3196cd120 100644 --- a/lib/librte_acl/acl_run_neon.h +++ b/lib/librte_acl/acl_run_neon.h @@ -181,8 +181,8 @@ search_neon_8(const struct rte_acl_ctx *ctx, const uint8_t **data, while (flows.started > 0) { /* Gather 4 bytes of input data for each stream. */ - input0 = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 0), input0, 0); - input1 = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 4), input1, 0); + input0 = vdupq_n_s32(GET_NEXT_4BYTES(parms, 0)); + input1 = vdupq_n_s32(GET_NEXT_4BYTES(parms, 4)); input0 = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 1), input0, 1); input1 = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 5), input1, 1); @@ -242,7 +242,7 @@ search_neon_4(const struct rte_acl_ctx *ctx, const uint8_t **data, while (flows.started > 0) { /* Gather 4 bytes of input data for each stream. */ - input = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 0), input, 0); + input = vdupq_n_s32(GET_NEXT_4BYTES(parms, 0)); input = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 1), input, 1); input = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 2), input, 2); input = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 3), input, 3); -- 2.20.1