From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Wise Subject: Re: [PATCH] iw_cxgb4: Use proper enumerated type in c4iw_bar2_addrs Date: Mon, 24 Sep 2018 14:41:26 -0500 Message-ID: References: <20180924192903.16796-1-natechancellor@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20180924192903.16796-1-natechancellor@gmail.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Nathan Chancellor , Doug Ledford , Jason Gunthorpe Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Nick Desaulniers List-Id: linux-rdma@vger.kernel.org On 9/24/2018 2:29 PM, Nathan Chancellor wrote: > Clang warns when one enumerated type is implicitly converted to another. > > drivers/infiniband/hw/cxgb4/qp.c:287:8: warning: implicit conversion > from enumeration type 'enum t4_bar2_qtype' to different enumeration type > 'enum cxgb4_bar2_qtype' [-Wenum-conversion] > T4_BAR2_QTYPE_EGRESS, > ^~~~~~~~~~~~~~~~~~~~ > > c4iw_bar2_addrs expects a value from enum cxgb4_bar2_qtype so use the > corresponding values from that type so Clang is satisfied without > changing the meaning of the code. > > T4_BAR2_QTYPE_EGRESS = CXGB4_BAR2_QTYPE_EGRESS = 0 > T4_BAR2_QTYPE_INGRESS = CXGB4_BAR2_QTYPE_INGRESS = 1 > > Reported-by: Nick Desaulniers > Signed-off-by: Nathan Chancellor Looks correct, Thanks. Acked-by: Steve Wise