fm10k: update comment regarding reserved bits check
authorJacob Keller <[email protected]>
Fri, 1 Apr 2016 23:17:38 +0000 (16:17 -0700)
committerJeff Kirsher <[email protected]>
Thu, 21 Apr 2016 06:07:32 +0000 (23:07 -0700)
The original comment may be read incorrectly as referring to checking
the *entire* length is zero. However, it merely checks only the reserved
bits of both length and reserved in a small amount of code. Update the
comment to indicate this is a clever trick and clearly spell out that it
only checks the reserve bits.

Signed-off-by: Jacob Keller <[email protected]>
Tested-by: Krishneil Singh <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
drivers/net/ethernet/intel/fm10k/fm10k_vf.c

index 801238dec6242466905128df8f365bc386eba97a..0440706eeb82603d21fba15531de23278503848e 100644 (file)
@@ -188,7 +188,7 @@ static s32 fm10k_update_vlan_vf(struct fm10k_hw *hw, u32 vid, u8 vsi, bool set)
        if (vsi)
                return FM10K_ERR_PARAM;
 
-       /* verify upper 4 bits of vid and length are 0 */
+       /* clever trick to verify reserved bits in both vid and length */
        if ((vid << 16 | vid) >> 28)
                return FM10K_ERR_PARAM;