From patchwork Tue Oct 26 05:05:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkat Duvvuru X-Patchwork-Id: 102847 X-Patchwork-Delegate: ajit.khaparde@broadcom.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 43A81A0C47; Tue, 26 Oct 2021 07:07:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4945B411A5; Tue, 26 Oct 2021 07:06:52 +0200 (CEST) Received: from relay.smtp-ext.broadcom.com (lpdvsmtp11.broadcom.com [192.19.166.231]) by mails.dpdk.org (Postfix) with ESMTP id 305A04118B for ; Tue, 26 Oct 2021 07:06:21 +0200 (CEST) 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 798AB7FF8; Mon, 25 Oct 2021 22:06:19 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 798AB7FF8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1635224780; bh=5fxUqJxeYHGQyFG0RHQz0YJxkMI2PbOG7yWZmaa5+bA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UDkwA3sIKkHtpbL4ead9YAphvpGtbLrzQ9u352Scw0j27NenQpKDaYOKWE3bGbqwX dOSK6tQEPZ69VYZ0a9nJo8vzMWqeW3p6/LRV5PjgpHL1FnxEFg7QOnoOqRrboN1yIa 69fPsY/ZDH0W/aQx/dcc7Ng+lxTgHvOZbZJHyd1Q= From: Venkat Duvvuru To: dev@dpdk.org Cc: Shahaji Bhosle , Venkat Duvvuru Date: Tue, 26 Oct 2021 10:35:39 +0530 Message-Id: <20211026050547.14692-12-venkatkumar.duvvuru@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211026050547.14692-1-venkatkumar.duvvuru@broadcom.com> References: <20211001055909.27276-1-venkatkumar.duvvuru@broadcom.com> <20211026050547.14692-1-venkatkumar.duvvuru@broadcom.com> Subject: [dpdk-dev] [PATCH v2 11/19] 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 -