mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 08:26:59 +00:00
i40e: Use proper enum in i40e_ndo_set_vf_link_state
[ Upstream commit43ade6ad18
] Clang warns when one enumerated type is converted implicitly to another. drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c:4214:42: warning: implicit conversion from enumeration type 'enum i40e_aq_link_speed' to different enumeration type 'enum virtchnl_link_speed' [-Wenum-conversion] pfe.event_data.link_event.link_speed = I40E_LINK_SPEED_40GB; ~ ^~~~~~~~~~~~~~~~~~~~ 1 warning generated. Use the proper enum from virtchnl_link_speed, which has the same value as I40E_LINK_SPEED_40GB, VIRTCHNL_LINK_SPEED_40GB. This appears to be missed by commitff3f4cc267
("virtchnl: finish conversion to virtchnl interface"). Link: https://github.com/ClangBuiltLinux/linux/issues/81 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
22b8d7e3bc
commit
0e1fd69cff
1 changed files with 1 additions and 1 deletions
|
@ -4211,7 +4211,7 @@ int i40e_ndo_set_vf_link_state(struct net_device *netdev, int vf_id, int link)
|
|||
vf->link_forced = true;
|
||||
vf->link_up = true;
|
||||
pfe.event_data.link_event.link_status = true;
|
||||
pfe.event_data.link_event.link_speed = I40E_LINK_SPEED_40GB;
|
||||
pfe.event_data.link_event.link_speed = VIRTCHNL_LINK_SPEED_40GB;
|
||||
break;
|
||||
case IFLA_VF_LINK_STATE_DISABLE:
|
||||
vf->link_forced = true;
|
||||
|
|
Loading…
Reference in a new issue