Date: Wed, 26 Dec 2018 10:12:15 +0000 (UTC) From: Andrew Rybchenko <arybchik@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r342502 - stable/10/sys/dev/sfxge/common Message-ID: <201812261012.wBQACFO8023345@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: arybchik Date: Wed Dec 26 10:12:15 2018 New Revision: 342502 URL: https://svnweb.freebsd.org/changeset/base/342502 Log: MFC r340889 sfxge(4): fix warnings from VS2015 C compiler (C4189) Fix multiple level 4 warnings "C4189: 'xxx': local variable is initialized but not referenced"; no functional changes. Submitted by: Andrew Lee <alee at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18123 Modified: stable/10/sys/dev/sfxge/common/ef10_ev.c stable/10/sys/dev/sfxge/common/efx_ev.c stable/10/sys/dev/sfxge/common/efx_tx.c stable/10/sys/dev/sfxge/common/mcdi_mon.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/ef10_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/common/ef10_ev.c Wed Dec 26 10:09:53 2018 (r342501) +++ stable/10/sys/dev/sfxge/common/ef10_ev.c Wed Dec 26 10:12:15 2018 (r342502) @@ -576,7 +576,7 @@ ef10_ev_qdestroy( EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON || enp->en_family == EFX_FAMILY_MEDFORD); - (void) efx_mcdi_fini_evq(eep->ee_enp, eep->ee_index); + (void) efx_mcdi_fini_evq(enp, eep->ee_index); } __checkReturn efx_rc_t Modified: stable/10/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_ev.c Wed Dec 26 10:09:53 2018 (r342501) +++ stable/10/sys/dev/sfxge/common/efx_ev.c Wed Dec 26 10:12:15 2018 (r342502) @@ -226,14 +226,14 @@ efx_ev_qcreate( __deref_out efx_evq_t **eepp) { const efx_ev_ops_t *eevop = enp->en_eevop; - efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_evq_t *eep; efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_EV); - EFSYS_ASSERT3U(enp->en_ev_qcount + 1, <, encp->enc_evq_limit); + EFSYS_ASSERT3U(enp->en_ev_qcount + 1, <, + enp->en_nic_cfg.enc_evq_limit); switch (flags & EFX_EVQ_FLAGS_NOTIFY_MASK) { case EFX_EVQ_FLAGS_NOTIFY_INTERRUPT: Modified: stable/10/sys/dev/sfxge/common/efx_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_tx.c Wed Dec 26 10:09:53 2018 (r342501) +++ stable/10/sys/dev/sfxge/common/efx_tx.c Wed Dec 26 10:12:15 2018 (r342502) @@ -301,14 +301,14 @@ efx_tx_qcreate( __out unsigned int *addedp) { const efx_tx_ops_t *etxop = enp->en_etxop; - efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_txq_t *etp; efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_TX); - EFSYS_ASSERT3U(enp->en_tx_qcount + 1, <, encp->enc_txq_limit); + EFSYS_ASSERT3U(enp->en_tx_qcount + 1, <, + enp->en_nic_cfg.enc_txq_limit); /* Allocate an TXQ object */ EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (efx_txq_t), etp); Modified: stable/10/sys/dev/sfxge/common/mcdi_mon.c ============================================================================== --- stable/10/sys/dev/sfxge/common/mcdi_mon.c Wed Dec 26 10:09:53 2018 (r342501) +++ stable/10/sys/dev/sfxge/common/mcdi_mon.c Wed Dec 26 10:12:15 2018 (r342502) @@ -265,7 +265,6 @@ mcdi_mon_ev( __out efx_mon_stat_value_t *valuep) { efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); - efx_nic_cfg_t *encp = &(enp->en_nic_cfg); uint16_t port_mask; uint16_t sensor; uint16_t state; @@ -281,11 +280,13 @@ mcdi_mon_ev( value = (uint16_t)MCDI_EV_FIELD(eqp, SENSOREVT_VALUE); /* Hardware must support this MCDI sensor */ - EFSYS_ASSERT3U(sensor, <, (8 * encp->enc_mcdi_sensor_mask_size)); + EFSYS_ASSERT3U(sensor, <, + (8 * enp->en_nic_cfg.enc_mcdi_sensor_mask_size)); EFSYS_ASSERT((sensor % MCDI_MON_PAGE_SIZE) != MC_CMD_SENSOR_PAGE0_NEXT); - EFSYS_ASSERT(encp->enc_mcdi_sensor_maskp != NULL); - EFSYS_ASSERT((encp->enc_mcdi_sensor_maskp[sensor / MCDI_MON_PAGE_SIZE] & - (1U << (sensor % MCDI_MON_PAGE_SIZE))) != 0); + EFSYS_ASSERT(enp->en_nic_cfg.enc_mcdi_sensor_maskp != NULL); + EFSYS_ASSERT( + (enp->en_nic_cfg.enc_mcdi_sensor_maskp[sensor/MCDI_MON_PAGE_SIZE] & + (1U << (sensor % MCDI_MON_PAGE_SIZE))) != 0); /* But we don't have to understand it */ if (sensor >= EFX_ARRAY_SIZE(mcdi_sensor_map)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812261012.wBQACFO8023345>