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 B9EE6A0C4D; Tue, 2 Nov 2021 05:07:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C81874116A; Tue, 2 Nov 2021 05:06:24 +0100 (CET) Received: from relay.smtp-ext.broadcom.com (lpdvacalvio01.broadcom.com [192.19.166.228]) by mails.dpdk.org (Postfix) with ESMTP id 634B541135 for ; Tue, 2 Nov 2021 05:06:23 +0100 (CET) Received: from S60.dhcp.broadcom.net (unknown [10.123.66.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by relay.smtp-ext.broadcom.com (Postfix) with ESMTPS id A553BEA; Mon, 1 Nov 2021 21:06:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com A553BEA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1635825982; bh=5fxUqJxeYHGQyFG0RHQz0YJxkMI2PbOG7yWZmaa5+bA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JqsBvL4q7jvMNix++Hkduu54zG3zHlzGzo+w+5ssPk9Vu9Iv7Ztr0/RyGKp08W07R cAzc5YwRJBh5IUmaNml3tJkb9Q87U1gr3noPd/MW24CIQpCNU9GBd3aq2uNKaiCB3y p6CuyhcWMJEkn33Tle/5uhse+0353pZ8b4bX1WgE= From: Venkat Duvvuru To: dev@dpdk.org Cc: Shahaji Bhosle , Venkat Duvvuru Date: Tue, 2 Nov 2021 09:35:47 +0530 Message-Id: <20211102040556.7840-12-venkatkumar.duvvuru@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211102040556.7840-1-venkatkumar.duvvuru@broadcom.com> References: <20211001055909.27276-1-venkatkumar.duvvuru@broadcom.com> <20211102040556.7840-1-venkatkumar.duvvuru@broadcom.com> Subject: [dpdk-dev] [PATCH v3 11/20] net/bnxt: fix clang compiler warnings 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" From: Shahaji Bhosle Typecast flow_item type, action_item type and the ENUMs to uint32_t before comparing. Fixes: 53a0d4f7663 ("net/bnxt: support flow API item parsing") Signed-off-by: Shahaji Bhosle Signed-off-by: Venkat Duvvuru Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c index 605c29223c..d21c088d59 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c @@ -137,10 +137,10 @@ bnxt_ulp_rte_parser_hdr_parse(const struct rte_flow_item pattern[], /* Parse all the items in the pattern */ while (item && item->type != RTE_FLOW_ITEM_TYPE_END) { - if (item->type >= (uint32_t) + if (item->type >= (typeof(item->type)) BNXT_RTE_FLOW_ITEM_TYPE_END) { if (item->type >= - (uint32_t)BNXT_RTE_FLOW_ITEM_TYPE_LAST) + (typeof(item->type))BNXT_RTE_FLOW_ITEM_TYPE_LAST) goto hdr_parser_error; /* get the header information */ hdr_info = &ulp_vendor_hdr_info[item->type - @@ -186,9 +186,9 @@ bnxt_ulp_rte_parser_act_parse(const struct rte_flow_action actions[], /* Parse all the items in the pattern */ while (action_item && action_item->type != RTE_FLOW_ACTION_TYPE_END) { if (action_item->type >= - (uint32_t)BNXT_RTE_FLOW_ACTION_TYPE_END) { + (typeof(action_item->type))BNXT_RTE_FLOW_ACTION_TYPE_END) { if (action_item->type >= - (uint32_t)BNXT_RTE_FLOW_ACTION_TYPE_LAST) + (typeof(action_item->type))BNXT_RTE_FLOW_ACTION_TYPE_LAST) goto act_parser_error; /* get the header information from bnxt actinfo table */ hdr_info = &ulp_vendor_act_info[action_item->type - -- 2.17.1