From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D0FB2A0A0F; Mon, 5 Jul 2021 13:50:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 55AF74068C; Mon, 5 Jul 2021 13:50:39 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 780264003C for ; Mon, 5 Jul 2021 13:50:37 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10035"; a="272815249" X-IronPort-AV: E=Sophos;i="5.83,325,1616482800"; d="scan'208";a="272815249" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2021 04:50:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,325,1616482800"; d="scan'208";a="496100983" Received: from silpixa00400904.ir.intel.com ([10.243.23.83]) by fmsmga002.fm.intel.com with ESMTP; 05 Jul 2021 04:50:35 -0700 From: Rebecca Troy To: dev@dpdk.org Cc: ciara.power@intel.com, Rebecca Troy , Declan Doherty Date: Mon, 5 Jul 2021 11:50:30 +0000 Message-Id: <20210705115030.520497-1-rebecca.troy@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] test/crypto: use formal array size macro X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Replaces the use of local ARRAY_SIZE macro, which is not used anywhere else, with the formal RTE_DIM macro for better consistency in crypto unit test. Signed-off-by: Rebecca Troy --- app/test/test_cryptodev.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 39db52b17a..b5ac5b048a 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -61,10 +61,6 @@ #define IN_PLACE 0 #define OUT_OF_PLACE 1 -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -#endif - static int gbl_driver_id; static enum rte_security_session_action_type gbl_action_type = @@ -8736,7 +8732,7 @@ test_PDCP_SDAP_PROTO_encap_all(void) int err, all_err = TEST_SUCCESS; const struct pdcp_sdap_test *cur_test; - size = ARRAY_SIZE(list_pdcp_sdap_tests); + size = RTE_DIM(list_pdcp_sdap_tests); for (i = 0; i < size; i++) { cur_test = &list_pdcp_sdap_tests[i]; @@ -8778,7 +8774,7 @@ test_PDCP_SDAP_PROTO_decap_all(void) int err, all_err = TEST_SUCCESS; const struct pdcp_sdap_test *cur_test; - size = ARRAY_SIZE(list_pdcp_sdap_tests); + size = RTE_DIM(list_pdcp_sdap_tests); for (i = 0; i < size; i++) { cur_test = &list_pdcp_sdap_tests[i]; -- 2.25.1