aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sfxge/common/efx_lic.c
diff options
context:
space:
mode:
authorAndrew Rybchenko <arybchik@FreeBSD.org>2016-05-12 06:19:06 +0000
committerAndrew Rybchenko <arybchik@FreeBSD.org>2016-05-12 06:19:06 +0000
commitec831f7ff9998acbd016a75a33d4b2ac059166ef (patch)
tree8862055d88c2fa54e254ae3673482507bd5b1b58 /sys/dev/sfxge/common/efx_lic.c
parenteeb6394364222289c401422a054d680576b050d2 (diff)
downloadsrc-ec831f7ff9998acbd016a75a33d4b2ac059166ef.tar.gz
src-ec831f7ff9998acbd016a75a33d4b2ac059166ef.zip
sfxge(4): cleanup: constify common code method tables
Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6317
Notes
Notes: svn path=/head/; revision=299517
Diffstat (limited to 'sys/dev/sfxge/common/efx_lic.c')
-rw-r--r--sys/dev/sfxge/common/efx_lic.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/sys/dev/sfxge/common/efx_lic.c b/sys/dev/sfxge/common/efx_lic.c
index 33c8aba6abfc..9f0d080cfb63 100644
--- a/sys/dev/sfxge/common/efx_lic.c
+++ b/sys/dev/sfxge/common/efx_lic.c
@@ -47,7 +47,7 @@ efx_mcdi_fc_license_get_key_stats(
__in efx_nic_t *enp,
__out efx_key_stats_t *eksp);
-static efx_lic_ops_t __efx_lic_v1_ops = {
+static const efx_lic_ops_t __efx_lic_v1_ops = {
efx_mcdi_fc_license_update_license, /* elo_update_licenses */
efx_mcdi_fc_license_get_key_stats, /* elo_get_key_stats */
NULL, /* elo_app_state */
@@ -73,7 +73,7 @@ efx_mcdi_licensed_app_state(
__in uint64_t app_id,
__out boolean_t *licensedp);
-static efx_lic_ops_t __efx_lic_v2_ops = {
+static const efx_lic_ops_t __efx_lic_v2_ops = {
efx_mcdi_licensing_update_licenses, /* elo_update_licenses */
efx_mcdi_licensing_get_key_stats, /* elo_get_key_stats */
efx_mcdi_licensed_app_state, /* elo_app_state */
@@ -108,7 +108,7 @@ efx_mcdi_licensing_v3_get_id(
__out_bcount_part_opt(buffer_size, *lengthp)
uint8_t *bufferp);
-static efx_lic_ops_t __efx_lic_v3_ops = {
+static const efx_lic_ops_t __efx_lic_v3_ops = {
efx_mcdi_licensing_v3_update_licenses, /* elo_update_licenses */
efx_mcdi_licensing_v3_report_license, /* elo_get_key_stats */
efx_mcdi_licensing_v3_app_state, /* elo_app_state */
@@ -624,7 +624,7 @@ fail1:
efx_lic_init(
__in efx_nic_t *enp)
{
- efx_lic_ops_t *elop;
+ const efx_lic_ops_t *elop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -635,19 +635,19 @@ efx_lic_init(
#if EFSYS_OPT_SIENA
case EFX_FAMILY_SIENA:
- elop = (efx_lic_ops_t *)&__efx_lic_v1_ops;
+ elop = &__efx_lic_v1_ops;
break;
#endif /* EFSYS_OPT_SIENA */
#if EFSYS_OPT_HUNTINGTON
case EFX_FAMILY_HUNTINGTON:
- elop = (efx_lic_ops_t *)&__efx_lic_v2_ops;
+ elop = &__efx_lic_v2_ops;
break;
#endif /* EFSYS_OPT_HUNTINGTON */
#if EFSYS_OPT_MEDFORD
case EFX_FAMILY_MEDFORD:
- elop = (efx_lic_ops_t *)&__efx_lic_v3_ops;
+ elop = &__efx_lic_v3_ops;
break;
#endif /* EFSYS_OPT_MEDFORD */
@@ -672,7 +672,7 @@ fail1:
efx_lic_fini(
__in efx_nic_t *enp)
{
- efx_lic_ops_t *elop = enp->en_elop;
+ const efx_lic_ops_t *elop = enp->en_elop;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
@@ -687,7 +687,7 @@ efx_lic_fini(
efx_lic_update_licenses(
__in efx_nic_t *enp)
{
- efx_lic_ops_t *elop = enp->en_elop;
+ const efx_lic_ops_t *elop = enp->en_elop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -709,7 +709,7 @@ efx_lic_get_key_stats(
__in efx_nic_t *enp,
__out efx_key_stats_t *eksp)
{
- efx_lic_ops_t *elop = enp->en_elop;
+ const efx_lic_ops_t *elop = enp->en_elop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -732,7 +732,7 @@ efx_lic_app_state(
__in uint64_t app_id,
__out boolean_t *licensedp)
{
- efx_lic_ops_t *elop = enp->en_elop;
+ const efx_lic_ops_t *elop = enp->en_elop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
@@ -764,7 +764,7 @@ efx_lic_get_id(
__out_opt uint8_t *bufferp
)
{
- efx_lic_ops_t *elop = enp->en_elop;
+ const efx_lic_ops_t *elop = enp->en_elop;
efx_rc_t rc;
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);