From: Michael Chan <michael.c...@broadcom.com>
Date: Mon, 30 Jan 2017 20:49:26 -0500

> @@ -776,7 +778,7 @@ static struct sk_buff *bnxt_rx_skb(struct bnxt *bp,
>       }
>  
>       skb_reserve(skb, BNXT_RX_OFFSET);
> -     skb_put(skb, len);
> +     skb_put(skb, len & 0xffff);
>       return skb;
>  }
>  

Like Jakub I wonder about this.

The caller extracts the length field out of the descriptor using a
right shift of an unsigned value by 16 bits.  The mask seems
completely unnecessary.

If it is needed, perhaps due to some subsequent change, then please
document it and pair the change with the part the necessitates it.

Thank you.

Reply via email to