Skip to content

Commit

Permalink
cxgb4: silence shift wrapping static checker warning
Browse files Browse the repository at this point in the history
I don't know how large "tp->vlan_shift" is but static checkers worry
about shift wrapping bugs here.

Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Dimitris Michailidis <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Dan Carpenter authored and davem330 committed Jan 13, 2014
1 parent 228fdc0 commit 9ef9730
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/chelsio/cxgb4/l2t.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ u64 cxgb4_select_ntuple(struct net_device *dev,
* in the Compressed Filter Tuple.
*/
if (tp->vlan_shift >= 0 && l2t->vlan != VLAN_NONE)
ntuple |= (F_FT_VLAN_VLD | l2t->vlan) << tp->vlan_shift;
ntuple |= (u64)(F_FT_VLAN_VLD | l2t->vlan) << tp->vlan_shift;

if (tp->port_shift >= 0)
ntuple |= (u64)l2t->lport << tp->port_shift;
Expand Down

0 comments on commit 9ef9730

Please sign in to comment.