diff options
author | Jacob Keller <jacob.e.keller@intel.com> | 2016-04-01 19:17:38 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2016-04-21 02:07:32 -0400 |
commit | fb6515c8f03bbfdc99cff156becd5e14df1dd601 (patch) | |
tree | 3fd71cac5c75d90659e85f357e1d447619c8aa1c | |
parent | 5c69df8a33408c82ac633c521be0acf71a690d43 (diff) |
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: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_vf.c b/drivers/net/ethernet/intel/fm10k/fm10k_vf.c index 801238dec624..0440706eeb82 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_vf.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_vf.c | |||
@@ -188,7 +188,7 @@ static s32 fm10k_update_vlan_vf(struct fm10k_hw *hw, u32 vid, u8 vsi, bool set) | |||
188 | if (vsi) | 188 | if (vsi) |
189 | return FM10K_ERR_PARAM; | 189 | return FM10K_ERR_PARAM; |
190 | 190 | ||
191 | /* verify upper 4 bits of vid and length are 0 */ | 191 | /* clever trick to verify reserved bits in both vid and length */ |
192 | if ((vid << 16 | vid) >> 28) | 192 | if ((vid << 16 | vid) >> 28) |
193 | return FM10K_ERR_PARAM; | 193 | return FM10K_ERR_PARAM; |
194 | 194 | ||