From 8e951edd32592322ee06f3adcb686f815995b890 Mon Sep 17 00:00:00 2001 From: arybchik Date: Fri, 27 Nov 2015 16:16:45 +0000 Subject: [PATCH] sfxge: cleanup: fix prefast annotations for stats buffers Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 2 days --- sys/dev/sfxge/common/efx.h | 4 ++-- sys/dev/sfxge/common/efx_mon.c | 2 +- sys/dev/sfxge/common/efx_phy.c | 2 +- sys/dev/sfxge/common/hunt_impl.h | 4 ++-- sys/dev/sfxge/common/hunt_mac.c | 2 +- sys/dev/sfxge/common/hunt_phy.c | 2 +- sys/dev/sfxge/common/mcdi_mon.c | 4 ++-- sys/dev/sfxge/common/mcdi_mon.h | 2 +- sys/dev/sfxge/common/siena_impl.h | 2 +- sys/dev/sfxge/common/siena_mac.c | 2 +- sys/dev/sfxge/common/siena_phy.c | 4 ++-- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/sys/dev/sfxge/common/efx.h b/sys/dev/sfxge/common/efx.h index 3435951e58fb..7ffb295e40fb 100644 --- a/sys/dev/sfxge/common/efx.h +++ b/sys/dev/sfxge/common/efx.h @@ -688,7 +688,7 @@ extern __checkReturn int efx_mon_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values); + __inout_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values); #endif /* EFSYS_OPT_MON_STATS */ @@ -946,7 +946,7 @@ extern __checkReturn int efx_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_PHY_NSTATS) uint32_t *stat); + __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat); #endif /* EFSYS_OPT_PHY_STATS */ diff --git a/sys/dev/sfxge/common/efx_mon.c b/sys/dev/sfxge/common/efx_mon.c index c5b356d687a9..5fcd757d5b49 100644 --- a/sys/dev/sfxge/common/efx_mon.c +++ b/sys/dev/sfxge/common/efx_mon.c @@ -307,7 +307,7 @@ efx_mon_stat_name( efx_mon_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values) + __inout_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values) { efx_mon_t *emp = &(enp->en_mon); efx_mon_ops_t *emop = emp->em_emop; diff --git a/sys/dev/sfxge/common/efx_phy.c b/sys/dev/sfxge/common/efx_phy.c index 5d18dc70b97b..1f4a949610b0 100644 --- a/sys/dev/sfxge/common/efx_phy.c +++ b/sys/dev/sfxge/common/efx_phy.c @@ -631,7 +631,7 @@ efx_phy_stat_name( efx_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_PHY_NSTATS) uint32_t *stat) + __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat) { efx_port_t *epp = &(enp->en_port); efx_phy_ops_t *epop = epp->ep_epop; diff --git a/sys/dev/sfxge/common/hunt_impl.h b/sys/dev/sfxge/common/hunt_impl.h index 0aa4ae52c564..a682e215b5f1 100644 --- a/sys/dev/sfxge/common/hunt_impl.h +++ b/sys/dev/sfxge/common/hunt_impl.h @@ -236,7 +236,7 @@ extern __checkReturn int hunt_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, + __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, __out_opt uint32_t *generationp); #endif /* EFSYS_OPT_MAC_STATS */ @@ -485,7 +485,7 @@ extern __checkReturn int hunt_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_PHY_NSTATS) uint32_t *stat); + __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat); #endif /* EFSYS_OPT_PHY_STATS */ diff --git a/sys/dev/sfxge/common/hunt_mac.c b/sys/dev/sfxge/common/hunt_mac.c index ebe04beb1b56..813729a7fb38 100644 --- a/sys/dev/sfxge/common/hunt_mac.c +++ b/sys/dev/sfxge/common/hunt_mac.c @@ -371,7 +371,7 @@ fail1: hunt_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, + __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, __out_opt uint32_t *generationp) { efx_qword_t value; diff --git a/sys/dev/sfxge/common/hunt_phy.c b/sys/dev/sfxge/common/hunt_phy.c index 1cffea21d9ff..3de4ba5c3102 100644 --- a/sys/dev/sfxge/common/hunt_phy.c +++ b/sys/dev/sfxge/common/hunt_phy.c @@ -495,7 +495,7 @@ hunt_phy_oui_get( hunt_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_PHY_NSTATS) uint32_t *stat) + __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat) { /* TBD: no stats support in firmware yet */ _NOTE(ARGUNUSED(enp, esmp)) diff --git a/sys/dev/sfxge/common/mcdi_mon.c b/sys/dev/sfxge/common/mcdi_mon.c index ec692be1e6c1..03b85acd1f62 100644 --- a/sys/dev/sfxge/common/mcdi_mon.c +++ b/sys/dev/sfxge/common/mcdi_mon.c @@ -162,7 +162,7 @@ mcdi_mon_decode_stats( __in size_t sensor_mask_size, __in_opt efsys_mem_t *esmp, __out_ecount_opt(sensor_mask_size) uint32_t *stat_maskp, - __out_ecount_opt(EFX_MON_NSTATS) efx_mon_stat_value_t *stat) + __inout_ecount_opt(EFX_MON_NSTATS) efx_mon_stat_value_t *stat) { efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); uint16_t port_mask; @@ -435,7 +435,7 @@ fail1: mcdi_mon_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values) + __inout_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values) { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); uint32_t size = encp->enc_mon_stat_dma_buf_size; diff --git a/sys/dev/sfxge/common/mcdi_mon.h b/sys/dev/sfxge/common/mcdi_mon.h index 30bb15022581..f948852f5d08 100644 --- a/sys/dev/sfxge/common/mcdi_mon.h +++ b/sys/dev/sfxge/common/mcdi_mon.h @@ -63,7 +63,7 @@ extern __checkReturn int mcdi_mon_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values); + __inout_ecount(EFX_MON_NSTATS) efx_mon_stat_value_t *values); #endif /* EFSYS_OPT_MON_STATS */ diff --git a/sys/dev/sfxge/common/siena_impl.h b/sys/dev/sfxge/common/siena_impl.h index b65e39986ddf..d7cc52c0d727 100644 --- a/sys/dev/sfxge/common/siena_impl.h +++ b/sys/dev/sfxge/common/siena_impl.h @@ -472,7 +472,7 @@ extern __checkReturn int siena_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, + __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, __out_opt uint32_t *generationp); #endif /* EFSYS_OPT_MAC_STATS */ diff --git a/sys/dev/sfxge/common/siena_mac.c b/sys/dev/sfxge/common/siena_mac.c index beeaea1a1c3e..f29e68c730c6 100644 --- a/sys/dev/sfxge/common/siena_mac.c +++ b/sys/dev/sfxge/common/siena_mac.c @@ -234,7 +234,7 @@ fail1: siena_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, + __inout_ecount(EFX_MAC_NSTATS) efsys_stat_t *stat, __out_opt uint32_t *generationp) { efx_qword_t value; diff --git a/sys/dev/sfxge/common/siena_phy.c b/sys/dev/sfxge/common/siena_phy.c index fd0871dd98c8..94485ea76bc6 100644 --- a/sys/dev/sfxge/common/siena_phy.c +++ b/sys/dev/sfxge/common/siena_phy.c @@ -466,7 +466,7 @@ siena_phy_decode_stats( __in uint32_t vmask, __in_opt efsys_mem_t *esmp, __out_opt uint64_t *smaskp, - __out_ecount_opt(EFX_PHY_NSTATS) uint32_t *stat) + __inout_ecount_opt(EFX_PHY_NSTATS) uint32_t *stat) { uint64_t smask = 0; @@ -550,7 +550,7 @@ siena_phy_decode_stats( siena_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_PHY_NSTATS) uint32_t *stat) + __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat) { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); uint32_t vmask = encp->enc_mcdi_phy_stat_mask;