DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dpdk-dev <dev@dpdk.org>
Cc: Shahaji Bhosle <sbhosle@broadcom.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/bnxt: fix clang compiler warnings
Date: Mon, 11 Oct 2021 10:55:22 -0700	[thread overview]
Message-ID: <CACZ4nhsftOyxq7BLfmF-KnF2qt6DRD=KjYwoTaSTsC_cjS45Pw@mail.gmail.com> (raw)
In-Reply-To: <20211010040755.3882-1-ajit.khaparde@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 1926 bytes --]

On Sat, Oct 9, 2021 at 9:07 PM Ajit Khaparde <ajit.khaparde@broadcom.com> wrote:
>
> From: Shahaji Bhosle <sbhosle@broadcom.com>
>
> Fix an error reported during CLANG compilation.
>
> -Wtautological-constant-out-of-range-compare for enums
>
> $ export CC=clang
> $ meson --werror --buildtype=debugoptimized build && ninja-build -C build
> "
> [..]
> ../../root/dpdk/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c:140:18: error: comparison of constant 2147483648 with expression of type 'const enum rte_flow_item_type' is always false [-Werror,-Wtautological-constant-out-of-range-compare]
>                 if (item->type >= (uint32_t)
>                     ~~~~~~~~~~ ^  ~~~~~~~~~~
> ../../root/dpdk/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c:142:19: error: comparison of constant 2147483650 with expression of type 'const enum rte_flow_item_type' is always false [-Werror,-Wtautological-constant-out-of-range-compare]
>                         if (item->type >=
>                             ~~~~~~~~~~ ^
> ../../root/dpdk/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c:188:25: error: comparison of constant 2147483648 with expression of type 'const enum rte_flow_action_type' is always false [-Werror,-Wtautological-constant-out-of-range-compare]
>                 if (action_item->type >=
>                     ~~~~~~~~~~~~~~~~~ ^
> ../../root/dpdk/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c:190:26: error: comparison of constant 2147483650 with expression of type 'const enum rte_flow_action_type' is always false [-Werror,-Wtautological-constant-out-of-range-compare]
>                         if (action_item->type >=
>                             ~~~~~~~~~~~~~~~~~ ^
> 4 errors generated.
> "
>
> Bugzilla ID: 821
> Fixes: bdf4a3c6316b ("net/bnxt: support tunnel offload")
>
> Signed-off-by: Shahaji Bhosle <sbhosle@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

Patch applied to dpdk-next-net-brcm. Thanks

  reply	other threads:[~2021-10-11 17:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-10  4:07 Ajit Khaparde
2021-10-11 17:55 ` Ajit Khaparde [this message]
2021-10-12  2:46 ` Stephen Hemminger
2021-10-12  4:08   ` Ajit Khaparde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACZ4nhsftOyxq7BLfmF-KnF2qt6DRD=KjYwoTaSTsC_cjS45Pw@mail.gmail.com' \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=sbhosle@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).