On Wed, Jan 11, 2012 at 9:30 PM, Hefty, Sean <sean.he...@intel.com> wrote:
> This function ends up like this, with my comments inline:
>        rate = (25 * attr.active_speed) / 10;
> We set rate here, but [...] The above switch statement
>  changes the value for 3 of the 5 cases, with 1 case not covered.
>        rate *= ib_width_enum_to_int(attr.active_width);
> It is modified again here

Yep, this function is surely not programming state of the art..
however, except for SDR, the above line doing rate = rate *
ib_width_enum_to_int(attr.active_width) would hold for all the speeds
and all the widths (1X, 4X, 12X), if we just set rate (possibly as a
string value) one time in each switch case, we would need to repeat
that multiplication there... I'm okay with that, would you recommend
to go that way? Roland any preference?

Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to