> > - qp_create.sq_sge = MAX_SEND_SGE < p_port->p_ca_attrs->max_sges ? > > - MAX_SEND_SGE : ( p_port->p_ca_attrs->max_sges - > > UD_QP_USED_SGE ); > > + if ( MAX_SEND_SGE < p_port->p_ca_attrs->max_sges ) > > I find this notation very hard to read: "CONSTANT <operator> variable". I > *much* prefer variable <operator> CONSTANT. The argument that it prevents > errors is weak, at best, since compilers will generate warnings for > assignment within conditionals. When looking at this code, I have to think > "if p_port->p_ca_attrs->max_sges > MAX_SEND_SGE" to be able to reason the > code flow.
Agree with this I do. Backwards makes the logic it does. _______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
