diff options
author | arybchik <arybchik@FreeBSD.org> | 2016-06-04 14:58:34 +0000 |
---|---|---|
committer | arybchik <arybchik@FreeBSD.org> | 2016-06-04 14:58:34 +0000 |
commit | 65178fd92bd5c819be167f42df675931dc6d4c06 (patch) | |
tree | 0c9a08882abb9ae9d7b96bcbf3372164730f0979 /sys/dev/sfxge/common/efx_tx.c | |
parent | f63a5f1ef8e75585bd9c8e253e04b123ec844537 (diff) | |
download | FreeBSD-src-65178fd92bd5c819be167f42df675931dc6d4c06.zip FreeBSD-src-65178fd92bd5c819be167f42df675931dc6d4c06.tar.gz |
MFC r299517
sfxge(4): cleanup: constify common code method tables
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Diffstat (limited to 'sys/dev/sfxge/common/efx_tx.c')
-rw-r--r-- | sys/dev/sfxge/common/efx_tx.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/sys/dev/sfxge/common/efx_tx.c b/sys/dev/sfxge/common/efx_tx.c index 686669b..811530d 100644 --- a/sys/dev/sfxge/common/efx_tx.c +++ b/sys/dev/sfxge/common/efx_tx.c @@ -125,7 +125,7 @@ falconsiena_tx_qstats_update( #if EFSYS_OPT_SIENA -static efx_tx_ops_t __efx_tx_siena_ops = { +static const efx_tx_ops_t __efx_tx_siena_ops = { falconsiena_tx_init, /* etxo_init */ falconsiena_tx_fini, /* etxo_fini */ falconsiena_tx_qcreate, /* etxo_qcreate */ @@ -151,7 +151,7 @@ static efx_tx_ops_t __efx_tx_siena_ops = { #endif /* EFSYS_OPT_SIENA */ #if EFSYS_OPT_HUNTINGTON -static efx_tx_ops_t __efx_tx_hunt_ops = { +static const efx_tx_ops_t __efx_tx_hunt_ops = { ef10_tx_init, /* etxo_init */ ef10_tx_fini, /* etxo_fini */ ef10_tx_qcreate, /* etxo_qcreate */ @@ -177,7 +177,7 @@ static efx_tx_ops_t __efx_tx_hunt_ops = { #endif /* EFSYS_OPT_HUNTINGTON */ #if EFSYS_OPT_MEDFORD -static efx_tx_ops_t __efx_tx_medford_ops = { +static const efx_tx_ops_t __efx_tx_medford_ops = { ef10_tx_init, /* etxo_init */ ef10_tx_fini, /* etxo_fini */ ef10_tx_qcreate, /* etxo_qcreate */ @@ -206,7 +206,7 @@ static efx_tx_ops_t __efx_tx_medford_ops = { efx_tx_init( __in efx_nic_t *enp) { - efx_tx_ops_t *etxop; + const efx_tx_ops_t *etxop; efx_rc_t rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); @@ -225,19 +225,19 @@ efx_tx_init( switch (enp->en_family) { #if EFSYS_OPT_SIENA case EFX_FAMILY_SIENA: - etxop = (efx_tx_ops_t *)&__efx_tx_siena_ops; + etxop = &__efx_tx_siena_ops; break; #endif /* EFSYS_OPT_SIENA */ #if EFSYS_OPT_HUNTINGTON case EFX_FAMILY_HUNTINGTON: - etxop = (efx_tx_ops_t *)&__efx_tx_hunt_ops; + etxop = &__efx_tx_hunt_ops; break; #endif /* EFSYS_OPT_HUNTINGTON */ #if EFSYS_OPT_MEDFORD case EFX_FAMILY_MEDFORD: - etxop = (efx_tx_ops_t *)&__efx_tx_medford_ops; + etxop = &__efx_tx_medford_ops; break; #endif /* EFSYS_OPT_MEDFORD */ @@ -274,7 +274,7 @@ fail1: efx_tx_fini( __in efx_nic_t *enp) { - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC); @@ -300,7 +300,7 @@ efx_tx_qcreate( __deref_out efx_txq_t **etpp, __out unsigned int *addedp) { - efx_tx_ops_t *etxop = enp->en_etxop; + 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; @@ -349,7 +349,7 @@ efx_tx_qdestroy( __in efx_txq_t *etp) { efx_nic_t *enp = etp->et_enp; - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -371,7 +371,7 @@ efx_tx_qpost( __inout unsigned int *addedp) { efx_nic_t *enp = etp->et_enp; - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; efx_rc_t rc; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -394,7 +394,7 @@ efx_tx_qpush( __in unsigned int pushed) { efx_nic_t *enp = etp->et_enp; - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -407,7 +407,7 @@ efx_tx_qpace( __in unsigned int ns) { efx_nic_t *enp = etp->et_enp; - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; efx_rc_t rc; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -427,7 +427,7 @@ efx_tx_qflush( __in efx_txq_t *etp) { efx_nic_t *enp = etp->et_enp; - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; efx_rc_t rc; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -447,7 +447,7 @@ efx_tx_qenable( __in efx_txq_t *etp) { efx_nic_t *enp = etp->et_enp; - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -459,7 +459,7 @@ efx_tx_qpio_enable( __in efx_txq_t *etp) { efx_nic_t *enp = etp->et_enp; - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; efx_rc_t rc; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -491,7 +491,7 @@ efx_tx_qpio_disable( __in efx_txq_t *etp) { efx_nic_t *enp = etp->et_enp; - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -507,7 +507,7 @@ efx_tx_qpio_write( __in size_t pio_buf_offset) { efx_nic_t *enp = etp->et_enp; - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; efx_rc_t rc; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -534,7 +534,7 @@ efx_tx_qpio_post( __inout unsigned int *addedp) { efx_nic_t *enp = etp->et_enp; - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; efx_rc_t rc; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -562,7 +562,7 @@ efx_tx_qdesc_post( __inout unsigned int *addedp) { efx_nic_t *enp = etp->et_enp; - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; efx_rc_t rc; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); @@ -587,7 +587,7 @@ efx_tx_qdesc_dma_create( __out efx_desc_t *edp) { efx_nic_t *enp = etp->et_enp; - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); EFSYS_ASSERT(etxop->etxo_qdesc_dma_create != NULL); @@ -604,7 +604,7 @@ efx_tx_qdesc_tso_create( __out efx_desc_t *edp) { efx_nic_t *enp = etp->et_enp; - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); EFSYS_ASSERT(etxop->etxo_qdesc_tso_create != NULL); @@ -622,7 +622,7 @@ efx_tx_qdesc_tso2_create( __in int count) { efx_nic_t *enp = etp->et_enp; - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); EFSYS_ASSERT(etxop->etxo_qdesc_tso2_create != NULL); @@ -637,7 +637,7 @@ efx_tx_qdesc_vlantci_create( __out efx_desc_t *edp) { efx_nic_t *enp = etp->et_enp; - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); EFSYS_ASSERT(etxop->etxo_qdesc_vlantci_create != NULL); @@ -653,7 +653,7 @@ efx_tx_qstats_update( __inout_ecount(TX_NQSTATS) efsys_stat_t *stat) { efx_nic_t *enp = etp->et_enp; - efx_tx_ops_t *etxop = enp->en_etxop; + const efx_tx_ops_t *etxop = enp->en_etxop; EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); |