Commit fb6515c8 authored by Jacob Keller's avatar Jacob Keller Committed by Jeff Kirsher

fm10k: update comment regarding reserved bits check

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: default avatarJacob Keller <jacob.e.keller@intel.com>
Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 5c69df8a
...@@ -188,7 +188,7 @@ static s32 fm10k_update_vlan_vf(struct fm10k_hw *hw, u32 vid, u8 vsi, bool set) ...@@ -188,7 +188,7 @@ static s32 fm10k_update_vlan_vf(struct fm10k_hw *hw, u32 vid, u8 vsi, bool set)
if (vsi) if (vsi)
return FM10K_ERR_PARAM; 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) if ((vid << 16 | vid) >> 28)
return FM10K_ERR_PARAM; return FM10K_ERR_PARAM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment