[ofa-general] Re: [PATCH] RDMA/cxgb3: logical-/bit-or confusion?

Roland Dreier rdreier at cisco.com
Wed Feb 18 10:41:48 PST 2009


 > > -	ep->mpa_attr.crc_enabled = (mpa->flags & MPA_CRC) | crc_enabled ? 1 : 0;
 > > +	ep->mpa_attr.crc_enabled = (mpa->flags & MPA_CRC) || crc_enabled ? 1 : 0;

I don't seem to have the original email for some reason.

Has anyone looked at which way generates better/smaller code?  Since ||
requires short-circuit evaluation it might be better to leave it as |.
But maybe it's not worth being so tricky.

If someone can resend the patch to me I'm happy to apply it.

 - R.



More information about the general mailing list