From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Nathan Chancellor <natechancellor@gmail.com>,
Andrew Bowers <andrewx.bowers@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
Sasha Levin <sashal@kernel.org>,
netdev@vger.kernel.org, clang-built-linux@googlegroups.com
Subject: [PATCH AUTOSEL 4.14 043/115] i40e: Use proper enum in i40e_ndo_set_vf_link_state
Date: Tue, 12 Nov 2019 20:55:10 -0500 [thread overview]
Message-ID: <20191113015622.11592-43-sashal@kernel.org> (raw)
In-Reply-To: <20191113015622.11592-1-sashal@kernel.org>
From: Nathan Chancellor <natechancellor@gmail.com>
[ Upstream commit 43ade6ad18416b8fd5bb3c9e9789faa666527eec ]
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 commit ff3f4cc267f6 ("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>
---
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index bdb7523216000..ea42240ddace7 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -3191,7 +3191,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;
--
2.20.1
next prev parent reply other threads:[~2019-11-13 2:13 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-13 1:54 [PATCH AUTOSEL 4.14 001/115] net: ovs: fix return type of ndo_start_xmit function Sasha Levin
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 002/115] net: xen-netback: " Sasha Levin
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 005/115] net: hns3: Fix for netdev not up problem when setting mtu Sasha Levin
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 008/115] SUNRPC: Fix priority queue fairness Sasha Levin
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 013/115] ath10k: fix vdev-start timeout on error Sasha Levin
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 016/115] ath9k: fix reporting calculated new FFT upper max Sasha Levin
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 019/115] nl80211: Fix a GET_KEY reply attribute Sasha Levin
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 027/115] sunrpc: Fix connect metrics Sasha Levin
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 029/115] cxgb4: Use proper enum in cxgb4_dcb_handle_fw_update Sasha Levin
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 030/115] cxgb4: Use proper enum in IEEE_FAUX_SYNC Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 042/115] ixgbe: Fix ixgbe TX hangs with XDP_TX beyond queue limit Sasha Levin
2019-11-13 1:55 ` Sasha Levin [this message]
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 044/115] ixgbe: Fix crash with VFs and flow director on interface flap Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 059/115] brcmfmac: reduce timeout for action frame scan Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 060/115] brcmfmac: fix full timeout waiting for action frame on-channel tx Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 061/115] qtnfmac: pass sgi rate info flag to wireless core Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 062/115] qtnfmac: drop error reports for out-of-bounds key indexes Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 077/115] xfrm: use correct size to initialise sp->ovec Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 079/115] iwlwifi: mvm: don't send keys when entering D3 Sasha Levin
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 105/115] netfilter: nft_compat: do not dump private area Sasha Levin
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 107/115] mac80211: minstrel: fix using short preamble CCK rates on HT clients Sasha Levin
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 108/115] mac80211: minstrel: fix CCK rate group streams value Sasha Levin
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 109/115] mac80211: minstrel: fix sampling/reporting of CCK rates in HT mode Sasha Levin
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 111/115] mlxsw: spectrum_switchdev: Check notification relevance based on upper device Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191113015622.11592-43-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=andrewx.bowers@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=natechancellor@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).