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

Steve Wise swise at opengridcomputing.com
Wed Feb 18 07:12:46 PST 2009


Roel Kluin wrote:
> Please review.
> --------------------------->8-------------8<------------------------------
> Logical-/bit-or typo
>
> Signed-off-by: Roel Kluin <roel.kluin at gmail.com>
> ---
> diff --git a/drivers/infiniband/hw/cxgb3/iwch_cm.c b/drivers/infiniband/hw/cxgb3/iwch_cm.c
> index 44e936e..61889e6 100644
> --- a/drivers/infiniband/hw/cxgb3/iwch_cm.c
> +++ b/drivers/infiniband/hw/cxgb3/iwch_cm.c
> @@ -890,7 +890,7 @@ static void process_mpa_reply(struct iwch_ep *ep, struct sk_buff *skb)
>  	 */
>  	state_set(&ep->com, FPDU_MODE);
>  	ep->mpa_attr.initiator = 1;
> -	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;
>  	ep->mpa_attr.recv_marker_enabled = markers_enabled;
>  	ep->mpa_attr.xmit_marker_enabled = mpa->flags & MPA_MARKERS ? 1 : 0;
>  	ep->mpa_attr.version = mpa_rev;
>   
This is a typo, but the logic behaves the same either way, which is why 
it wasn't detected I guess. 

But it should really be ||.

Reviewed-by: Steve Wise <swise at opengridcomputing.com>




More information about the general mailing list