[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180928161433.GC24524@ziepe.ca>
Date: Fri, 28 Sep 2018 10:14:33 -0600
From: Jason Gunthorpe <jgg@...pe.ca>
To: Nathan Chancellor <natechancellor@...il.com>
Cc: Michal Kalderon <Michal.Kalderon@...ium.com>,
Ariel Elior <Ariel.Elior@...ium.com>,
Doug Ledford <dledford@...hat.com>, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org,
Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH v2] RDMA/qedr: Remove enumerated type qed_roce_ll2_tx_dest
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@...gle.com>
> Signed-off-by: Nathan Chancellor <natechancellor@...il.com>
> Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
> Acked-by: Michal Kalderon <michal.kalderon@...ium.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
Powered by blists - more mailing lists