Commit 0976a016 authored by Jesse Brandeburg's avatar Jesse Brandeburg Committed by Jeff Kirsher

i40e: fix sign extension issue

This is a fix for an issue reported by coverity, reported
by Hannes Frederic Sowa.
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
CC: Hannes Frederic Sowa <hannes@stressinduktion.org>
Tested-by: default avatarKavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 004173cb
...@@ -99,9 +99,9 @@ int i40e_program_fdir_filter(struct i40e_fdir_data *fdir_data, ...@@ -99,9 +99,9 @@ int i40e_program_fdir_filter(struct i40e_fdir_data *fdir_data,
<< I40E_TXD_FLTR_QW0_DEST_VSI_SHIFT); << I40E_TXD_FLTR_QW0_DEST_VSI_SHIFT);
else else
fdir_desc->qindex_flex_ptype_vsi |= fdir_desc->qindex_flex_ptype_vsi |=
cpu_to_le32((fdir_data->dest_vsi cpu_to_le32((((u32)fdir_data->dest_vsi) <<
<< I40E_TXD_FLTR_QW0_DEST_VSI_SHIFT) I40E_TXD_FLTR_QW0_DEST_VSI_SHIFT) &
& I40E_TXD_FLTR_QW0_DEST_VSI_MASK); I40E_TXD_FLTR_QW0_DEST_VSI_MASK);
fdir_desc->dtype_cmd_cntindex = fdir_desc->dtype_cmd_cntindex =
cpu_to_le32(I40E_TX_DESC_DTYPE_FILTER_PROG); cpu_to_le32(I40E_TX_DESC_DTYPE_FILTER_PROG);
...@@ -127,9 +127,9 @@ int i40e_program_fdir_filter(struct i40e_fdir_data *fdir_data, ...@@ -127,9 +127,9 @@ int i40e_program_fdir_filter(struct i40e_fdir_data *fdir_data,
fdir_desc->dtype_cmd_cntindex |= fdir_desc->dtype_cmd_cntindex |=
cpu_to_le32(I40E_TXD_FLTR_QW1_CNT_ENA_MASK); cpu_to_le32(I40E_TXD_FLTR_QW1_CNT_ENA_MASK);
fdir_desc->dtype_cmd_cntindex |= fdir_desc->dtype_cmd_cntindex |=
cpu_to_le32((fdir_data->cnt_index cpu_to_le32((((u32)fdir_data->cnt_index) <<
<< I40E_TXD_FLTR_QW1_CNTINDEX_SHIFT) I40E_TXD_FLTR_QW1_CNTINDEX_SHIFT) &
& I40E_TXD_FLTR_QW1_CNTINDEX_MASK); I40E_TXD_FLTR_QW1_CNTINDEX_MASK);
} }
fdir_desc->fd_id = cpu_to_le32(fdir_data->fd_id); fdir_desc->fd_id = cpu_to_le32(fdir_data->fd_id);
......
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