On Mon, Apr 18, 2016 at 08:03:36AM -0400, Dennis Dalessandro wrote: > On Mon, Apr 18, 2016 at 10:07:08AM +0300, Leon Romanovsky wrote: > > >>diff --git a/drivers/staging/rdma/hfi1/qp.c > >>b/drivers/staging/rdma/hfi1/qp.c > >>index 29a5ad2..e68d08a 100644 > >>--- a/drivers/staging/rdma/hfi1/qp.c > >>+++ b/drivers/staging/rdma/hfi1/qp.c > >>@@ -167,8 +167,12 @@ static inline int opa_mtu_enum_to_int(int mtu) > >> */ > >> static inline int verbs_mtu_enum_to_int(struct ib_device *dev, enum ib_mtu mtu) > >> { > >>- int val = opa_mtu_enum_to_int((int)mtu); > >>+ int val; > >>+ /* Constraining 10KB packets to 8KB packets */ > >>+ if (mtu == (enum ib_mtu)OPA_MTU_10240) > >>+ mtu = OPA_MTU_8192; > >>+ val = opa_mtu_enum_to_int((int)mtu); > > > >Just spotted my attention, > >Curious names, castings and type conversions. > > > > Is there a question being implied here? I'm not clear on what kind of > response you are looking for here. No, there is no question here. mtu is type of "enum ib_mtu", which is converted to int and supplied to function which has opa_mtu_ENUM_to_int name. From the name of that function looks that the parameter supplied should be ENUM, but it is not the case. > > -Denny
Attachment:
signature.asc
Description: Digital signature