From: Jacob Keller Date: Fri, 1 Apr 2016 23:17:38 +0000 (-0700) Subject: fm10k: update comment regarding reserved bits check X-Git-Tag: v4.1.12-92~3^2~127 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=fc99c1fa881cb836bb05520d0940bce193a74f38;p=users%2Fjedix%2Flinux-maple.git 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 Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher Orabug: 25394529 (cherry picked from commit fb6515c8f03bbfdc99cff156becd5e14df1dd601) Signed-off-by: Jack Vogel --- diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_vf.c b/drivers/net/ethernet/intel/fm10k/fm10k_vf.c index c235766ed3e19..d042f6d510754 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) 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;