sfxge(4): fix ICC warning because of non-enum value usage
Fix ICC warning because of non-enum value asignment to enum variable. Found by upstreaming to DPDK. Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18163
This commit is contained in:
parent
b20c54ffe6
commit
b1fc8575b5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=341044
@ -1465,6 +1465,7 @@ efx_mcdi_get_phy_cfg(
|
||||
const char *namep;
|
||||
size_t namelen;
|
||||
#endif
|
||||
uint32_t phy_media_type;
|
||||
efx_rc_t rc;
|
||||
|
||||
(void) memset(payload, 0, sizeof (payload));
|
||||
@ -1515,8 +1516,8 @@ efx_mcdi_get_phy_cfg(
|
||||
EFX_STATIC_ASSERT(MC_CMD_MEDIA_SFP_PLUS == EFX_PHY_MEDIA_SFP_PLUS);
|
||||
EFX_STATIC_ASSERT(MC_CMD_MEDIA_BASE_T == EFX_PHY_MEDIA_BASE_T);
|
||||
EFX_STATIC_ASSERT(MC_CMD_MEDIA_QSFP_PLUS == EFX_PHY_MEDIA_QSFP_PLUS);
|
||||
epp->ep_fixed_port_type =
|
||||
MCDI_OUT_DWORD(req, GET_PHY_CFG_OUT_MEDIA_TYPE);
|
||||
phy_media_type = MCDI_OUT_DWORD(req, GET_PHY_CFG_OUT_MEDIA_TYPE);
|
||||
epp->ep_fixed_port_type = (efx_phy_media_type_t) phy_media_type;
|
||||
if (epp->ep_fixed_port_type >= EFX_PHY_MEDIA_NTYPES)
|
||||
epp->ep_fixed_port_type = EFX_PHY_MEDIA_INVALID;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user