From: Jason Gunthorpe <jgg@ziepe.ca>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: Michal Kalderon <Michal.Kalderon@cavium.com>,
Ariel Elior <Ariel.Elior@cavium.com>,
Doug Ledford <dledford@redhat.com>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
Nick Desaulniers <ndesaulniers@google.com>
Subject: Re: [PATCH v2] RDMA/qedr: Remove enumerated type qed_roce_ll2_tx_dest
Date: Fri, 28 Sep 2018 10:14:33 -0600 [thread overview]
Message-ID: <20180928161433.GC24524@ziepe.ca> (raw)
In-Reply-To: <20180927205557.32026-1-natechancellor@gmail.com>
On Thu, Sep 27, 2018 at 01:55:58PM -0700, Nathan Chancellor wrote:
> Clang warns when one enumerated type is explicitly converted to another.
>
> drivers/infiniband/hw/qedr/qedr_roce_cm.c:198:28: warning: implicit
> conversion from enumeration type 'enum qed_roce_ll2_tx_dest' to
> different enumeration type 'enum qed_ll2_tx_dest' [-Wenum-conversion]
> ll2_tx_pkt.tx_dest = pkt->tx_dest;
> ~ ~~~~~^~~~~~~
> 1 warning generated.
>
> Turns out that QED_ROCE_LL2_TX_DEST_NW and QED_ROCE_LL2_TX_DEST_LB are
> only used once in the whole tree and QED_ROCE_LL2_TX_DEST_MAX is used
> nowhere. Remove them and use the equivalent values from qed_ll2_tx_dest
> in their place.
>
> Reported-by: Nick Desaulniers <ndesaulniers@google.com>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> Acked-by: Michal Kalderon <michal.kalderon@cavium.com>
> ---
>
> v1 -> v2:
>
> * Rather than using an explicit cast, just convert the uses to the
> appropriate values and delete the duplicated enum.
Applied to for-next, thanks
Jason
prev parent reply other threads:[~2018-09-28 16:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-27 1:18 [PATCH] RDMA/qedr: Explicitly cast pkt->tx_dest to qed_ll2_tx_dest Nathan Chancellor
2018-09-27 20:28 ` Nick Desaulniers
2018-09-27 20:35 ` Nathan Chancellor
2018-09-27 20:41 ` Nick Desaulniers
2018-09-27 20:55 ` [PATCH v2] RDMA/qedr: Remove enumerated type qed_roce_ll2_tx_dest Nathan Chancellor
2018-09-27 22:29 ` Nick Desaulniers
2018-09-28 8:06 ` Kalderon, Michal
2018-09-28 16:14 ` Jason Gunthorpe [this message]
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=20180928161433.GC24524@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=Ariel.Elior@cavium.com \
--cc=Michal.Kalderon@cavium.com \
--cc=dledford@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.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).