summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrzegorz Siwik <grzegorz.siwik@intel.com>2019-03-29 15:08:37 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-11-10 10:29:03 +0100
commit9900bf4d433be6a2ed8c158779137c7a4742ab67 (patch)
treec2f2c40d58c0c08ee02235720d139bbcc3ae7a43
parent978c31f09d59cdd52cadc462f12862376e72f618 (diff)
downloadlinux-stable-9900bf4d433be6a2ed8c158779137c7a4742ab67.tar.gz
linux-stable-9900bf4d433be6a2ed8c158779137c7a4742ab67.tar.bz2
linux-stable-9900bf4d433be6a2ed8c158779137c7a4742ab67.zip
i40e: Wrong truncation from u16 to u8
commit c004804dceee9ca384d97d9857ea2e2795c2651d upstream. In this patch fixed wrong truncation method from u16 to u8 during validation. It was changed by changing u8 to u32 parameter in method declaration and arguments were changed to u32. Signed-off-by: Grzegorz Siwik <grzegorz.siwik@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 4134b0d8810e..d3e4ee507f70 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -204,7 +204,7 @@ static inline bool i40e_vc_isvalid_queue_id(struct i40e_vf *vf, u16 vsi_id,
*
* check for the valid vector id
**/
-static inline bool i40e_vc_isvalid_vector_id(struct i40e_vf *vf, u8 vector_id)
+static inline bool i40e_vc_isvalid_vector_id(struct i40e_vf *vf, u32 vector_id)
{
struct i40e_pf *pf = vf->pf;