From: Andy Moreton Date: Thu, 16 Nov 2017 08:04:27 +0000 (+0000) Subject: net/sfc/base: fix coding style X-Git-Tag: spdx-start~646 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f67e4719147d;p=dpdk.git net/sfc/base: fix coding style Signed-off-by: Andy Moreton Signed-off-by: Andrew Rybchenko --- diff --git a/drivers/net/sfc/base/ef10_filter.c b/drivers/net/sfc/base/ef10_filter.c index e1faf1ddd8..2dd823bbfe 100644 --- a/drivers/net/sfc/base/ef10_filter.c +++ b/drivers/net/sfc/base/ef10_filter.c @@ -1243,8 +1243,8 @@ typedef struct ef10_filter_encap_entry_s { uint32_t inner_frame_match; } ef10_filter_encap_entry_t; -#define EF10_ENCAP_FILTER_ENTRY(ipv, encap_type, inner_frame_match) \ - { EFX_ETHER_TYPE_##ipv, EFX_TUNNEL_PROTOCOL_##encap_type, \ +#define EF10_ENCAP_FILTER_ENTRY(ipv, encap_type, inner_frame_match) \ + { EFX_ETHER_TYPE_##ipv, EFX_TUNNEL_PROTOCOL_##encap_type, \ EFX_FILTER_INNER_FRAME_MATCH_UNKNOWN_##inner_frame_match } static ef10_filter_encap_entry_t ef10_filter_encap_list[] = { @@ -1305,8 +1305,8 @@ ef10_filter_insert_encap_filters( */ if ((mulcst == B_FALSE) && (encap_filter->inner_frame_match == - EFX_FILTER_INNER_FRAME_MATCH_UNKNOWN_MCAST_DST)) - continue; + EFX_FILTER_INNER_FRAME_MATCH_UNKNOWN_MCAST_DST)) + continue; efx_filter_spec_init_rx(&spec, EFX_FILTER_PRI_AUTO, filter_flags, diff --git a/drivers/net/sfc/base/ef10_impl.h b/drivers/net/sfc/base/ef10_impl.h index 1d3296f2bd..a9b286209a 100644 --- a/drivers/net/sfc/base/ef10_impl.h +++ b/drivers/net/sfc/base/ef10_impl.h @@ -50,8 +50,9 @@ extern "C" { */ #define EF10_NVRAM_CHUNK 0x80 -/* Alignment requirement for value written to RX WPTR: - * the WPTR must be aligned to an 8 descriptor boundary +/* + * Alignment requirement for value written to RX WPTR: the WPTR must be aligned + * to an 8 descriptor boundary. */ #define EF10_RX_WPTR_ALIGN 8 @@ -505,8 +506,7 @@ ef10_nvram_buffer_find_item_start( __in_bcount(buffer_size) caddr_t bufferp, __in size_t buffer_size, - __out uint32_t *startp - ); + __out uint32_t *startp); extern __checkReturn efx_rc_t ef10_nvram_buffer_find_end( @@ -514,8 +514,7 @@ ef10_nvram_buffer_find_end( caddr_t bufferp, __in size_t buffer_size, __in uint32_t offset, - __out uint32_t *endp - ); + __out uint32_t *endp); extern __checkReturn __success(return != B_FALSE) boolean_t ef10_nvram_buffer_find_item( @@ -524,8 +523,7 @@ ef10_nvram_buffer_find_item( __in size_t buffer_size, __in uint32_t offset, __out uint32_t *startp, - __out uint32_t *lengthp - ); + __out uint32_t *lengthp); extern __checkReturn efx_rc_t ef10_nvram_buffer_get_item( @@ -537,8 +535,7 @@ ef10_nvram_buffer_get_item( __out_bcount_part(item_max_size, *lengthp) caddr_t itemp, __in size_t item_max_size, - __out uint32_t *lengthp - ); + __out uint32_t *lengthp); extern __checkReturn efx_rc_t ef10_nvram_buffer_insert_item( @@ -548,8 +545,7 @@ ef10_nvram_buffer_insert_item( __in uint32_t offset, __in_bcount(length) caddr_t keyp, __in uint32_t length, - __out uint32_t *lengthp - ); + __out uint32_t *lengthp); extern __checkReturn efx_rc_t ef10_nvram_buffer_delete_item( @@ -558,15 +554,13 @@ ef10_nvram_buffer_delete_item( __in size_t buffer_size, __in uint32_t offset, __in uint32_t length, - __in uint32_t end - ); + __in uint32_t end); extern __checkReturn efx_rc_t ef10_nvram_buffer_finish( __in_bcount(buffer_size) caddr_t bufferp, - __in size_t buffer_size - ); + __in size_t buffer_size); #endif /* EFSYS_OPT_NVRAM */ @@ -795,7 +789,7 @@ ef10_tx_qstats_update( typedef uint32_t efx_piobuf_handle_t; -#define EFX_PIOBUF_HANDLE_INVALID ((efx_piobuf_handle_t) -1) +#define EFX_PIOBUF_HANDLE_INVALID ((efx_piobuf_handle_t)-1) extern __checkReturn efx_rc_t ef10_nic_pio_alloc( @@ -1034,7 +1028,7 @@ typedef struct ef10_filter_entry_s { * IPv4 or IPv6 outer frame, VXLAN, GENEVE or NVGRE packet type, and unicast or * multicast inner frames. */ -#define EFX_EF10_FILTER_ENCAP_FILTERS_MAX 12 +#define EFX_EF10_FILTER_ENCAP_FILTERS_MAX 12 typedef struct ef10_filter_table_s { ef10_filter_entry_t eft_entry[EFX_EF10_FILTER_TBL_ROWS]; @@ -1201,9 +1195,9 @@ ef10_external_port_mapping( /* Minimum space for packet in packed stream mode */ #define EFX_RX_PACKED_STREAM_MIN_PACKET_SPACE \ P2ROUNDUP(EFX_RX_PACKED_STREAM_RX_PREFIX_SIZE + \ - EFX_MAC_PDU_MIN + \ - EFX_RX_PACKED_STREAM_ALIGNMENT, \ - EFX_RX_PACKED_STREAM_ALIGNMENT) + EFX_MAC_PDU_MIN + \ + EFX_RX_PACKED_STREAM_ALIGNMENT, \ + EFX_RX_PACKED_STREAM_ALIGNMENT) /* Maximum number of credits */ #define EFX_RX_PACKED_STREAM_MAX_CREDITS 127 diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h index b809819226..eb44279beb 100644 --- a/drivers/net/sfc/base/efx.h +++ b/drivers/net/sfc/base/efx.h @@ -40,13 +40,13 @@ extern "C" { #endif #define EFX_STATIC_ASSERT(_cond) \ - ((void)sizeof(char[(_cond) ? 1 : -1])) + ((void)sizeof (char[(_cond) ? 1 : -1])) #define EFX_ARRAY_SIZE(_array) \ - (sizeof(_array) / sizeof((_array)[0])) + (sizeof (_array) / sizeof ((_array)[0])) #define EFX_FIELD_OFFSET(_type, _field) \ - ((size_t) &(((_type *)0)->_field)) + ((size_t)&(((_type *)0)->_field)) /* The macro expands divider twice */ #define EFX_DIV_ROUND_UP(_n, _d) (((_n) + (_d) - 1) / (_d)) @@ -558,7 +558,7 @@ efx_mac_stats_get_mask( #define EFX_MAC_STAT_SUPPORTED(_mask, _stat) \ ((_mask)[(_stat) / EFX_MAC_STATS_MASK_BITS_PER_PAGE] & \ - (1ULL << ((_stat) & (EFX_MAC_STATS_MASK_BITS_PER_PAGE - 1)))) + (1ULL << ((_stat) & (EFX_MAC_STATS_MASK_BITS_PER_PAGE - 1)))) #define EFX_MAC_STATS_SIZE 0x400 @@ -908,7 +908,8 @@ typedef enum efx_phy_media_type_e { EFX_PHY_MEDIA_NTYPES } efx_phy_media_type_t; -/* Get the type of medium currently used. If the board has ports for +/* + * Get the type of medium currently used. If the board has ports for * modules, a module is present, and we recognise the media type of * the module, then this will be the media type of the module. * Otherwise it will be the media type of the port. @@ -1009,7 +1010,7 @@ typedef enum efx_bist_type_e { EFX_BIST_TYPE_PHY_CABLE_SHORT, EFX_BIST_TYPE_PHY_CABLE_LONG, EFX_BIST_TYPE_MC_MEM, /* Test the MC DMEM and IMEM */ - EFX_BIST_TYPE_SAT_MEM, /* Test the DMEM and IMEM of satellite cpus*/ + EFX_BIST_TYPE_SAT_MEM, /* Test the DMEM and IMEM of satellite cpus */ EFX_BIST_TYPE_REG, /* Test the register memories */ EFX_BIST_TYPE_NTYPES, } efx_bist_type_t; @@ -1040,8 +1041,10 @@ typedef enum efx_bist_value_e { EFX_BIST_PHY_CABLE_STATUS_C, EFX_BIST_PHY_CABLE_STATUS_D, EFX_BIST_FAULT_CODE, - /* Memory BIST specific values. These match to the MC_CMD_BIST_POLL - * response. */ + /* + * Memory BIST specific values. These match to the MC_CMD_BIST_POLL + * response. + */ EFX_BIST_MEM_TEST, EFX_BIST_MEM_ADDR, EFX_BIST_MEM_BUS, @@ -1793,8 +1796,7 @@ typedef __checkReturn boolean_t typedef __checkReturn boolean_t (*efx_mac_stats_ev_t)( __in_opt void *arg, - __in uint32_t generation - ); + __in uint32_t generation); #endif /* EFSYS_OPT_MAC_STATS */ @@ -2510,8 +2512,7 @@ efx_lic_find_start( __in_bcount(buffer_size) caddr_t bufferp, __in size_t buffer_size, - __out uint32_t *startp - ); + __out uint32_t *startp); extern __checkReturn efx_rc_t efx_lic_find_end( @@ -2520,8 +2521,7 @@ efx_lic_find_end( caddr_t bufferp, __in size_t buffer_size, __in uint32_t offset, - __out uint32_t *endp - ); + __out uint32_t *endp); extern __checkReturn __success(return != B_FALSE) boolean_t efx_lic_find_key( @@ -2531,15 +2531,13 @@ efx_lic_find_key( __in size_t buffer_size, __in uint32_t offset, __out uint32_t *startp, - __out uint32_t *lengthp - ); + __out uint32_t *lengthp); extern __checkReturn __success(return != B_FALSE) boolean_t efx_lic_validate_key( __in efx_nic_t *enp, __in_bcount(length) caddr_t keyp, - __in uint32_t length - ); + __in uint32_t length); extern __checkReturn efx_rc_t efx_lic_read_key( @@ -2552,8 +2550,7 @@ efx_lic_read_key( __out_bcount_part(key_max_size, *lengthp) caddr_t keyp, __in size_t key_max_size, - __out uint32_t *lengthp - ); + __out uint32_t *lengthp); extern __checkReturn efx_rc_t efx_lic_write_key( @@ -2564,8 +2561,7 @@ efx_lic_write_key( __in uint32_t offset, __in_bcount(length) caddr_t keyp, __in uint32_t length, - __out uint32_t *lengthp - ); + __out uint32_t *lengthp); __checkReturn efx_rc_t efx_lic_delete_key( @@ -2576,24 +2572,21 @@ efx_lic_delete_key( __in uint32_t offset, __in uint32_t length, __in uint32_t end, - __out uint32_t *deltap - ); + __out uint32_t *deltap); extern __checkReturn efx_rc_t efx_lic_create_partition( __in efx_nic_t *enp, __in_bcount(buffer_size) caddr_t bufferp, - __in size_t buffer_size - ); + __in size_t buffer_size); extern __checkReturn efx_rc_t efx_lic_finish_partition( __in efx_nic_t *enp, __in_bcount(buffer_size) caddr_t bufferp, - __in size_t buffer_size - ); + __in size_t buffer_size); #endif /* EFSYS_OPT_LICENSING */ diff --git a/drivers/net/sfc/base/efx_impl.h b/drivers/net/sfc/base/efx_impl.h index c15608b290..255a6afa39 100644 --- a/drivers/net/sfc/base/efx_impl.h +++ b/drivers/net/sfc/base/efx_impl.h @@ -1039,8 +1039,7 @@ struct efx_txq_s { do { \ EFX_CHECK_REG((_enp), (_reg)); \ EFSYS_PROBE7(efx_bar_tbl_doorbell_writeo, \ - const char *, \ - #_reg, \ + const char *, #_reg, \ uint32_t, (_index), \ uint32_t, _reg ## _OFST, \ uint32_t, (_eop)->eo_u32[3], \ diff --git a/drivers/net/sfc/base/efx_lic.c b/drivers/net/sfc/base/efx_lic.c index 2cd05cc849..de25c5c00f 100644 --- a/drivers/net/sfc/base/efx_lic.c +++ b/drivers/net/sfc/base/efx_lic.c @@ -43,8 +43,7 @@ efx_lic_v1v2_find_start( __in_bcount(buffer_size) caddr_t bufferp, __in size_t buffer_size, - __out uint32_t *startp - ); + __out uint32_t *startp); __checkReturn efx_rc_t efx_lic_v1v2_find_end( @@ -53,8 +52,7 @@ efx_lic_v1v2_find_end( caddr_t bufferp, __in size_t buffer_size, __in uint32_t offset, - __out uint32_t *endp - ); + __out uint32_t *endp); __checkReturn __success(return != B_FALSE) boolean_t efx_lic_v1v2_find_key( @@ -64,15 +62,13 @@ efx_lic_v1v2_find_key( __in size_t buffer_size, __in uint32_t offset, __out uint32_t *startp, - __out uint32_t *lengthp - ); + __out uint32_t *lengthp); __checkReturn __success(return != B_FALSE) boolean_t efx_lic_v1v2_validate_key( __in efx_nic_t *enp, __in_bcount(length) caddr_t keyp, - __in uint32_t length - ); + __in uint32_t length); __checkReturn efx_rc_t efx_lic_v1v2_read_key( @@ -85,8 +81,7 @@ efx_lic_v1v2_read_key( __out_bcount_part(key_max_size, *lengthp) caddr_t keyp, __in size_t key_max_size, - __out uint32_t *lengthp - ); + __out uint32_t *lengthp); __checkReturn efx_rc_t efx_lic_v1v2_write_key( @@ -97,8 +92,7 @@ efx_lic_v1v2_write_key( __in uint32_t offset, __in_bcount(length) caddr_t keyp, __in uint32_t length, - __out uint32_t *lengthp - ); + __out uint32_t *lengthp); __checkReturn efx_rc_t efx_lic_v1v2_delete_key( @@ -109,24 +103,21 @@ efx_lic_v1v2_delete_key( __in uint32_t offset, __in uint32_t length, __in uint32_t end, - __out uint32_t *deltap - ); + __out uint32_t *deltap); __checkReturn efx_rc_t efx_lic_v1v2_create_partition( __in efx_nic_t *enp, __in_bcount(buffer_size) caddr_t bufferp, - __in size_t buffer_size - ); + __in size_t buffer_size); __checkReturn efx_rc_t efx_lic_v1v2_finish_partition( __in efx_nic_t *enp, __in_bcount(buffer_size) caddr_t bufferp, - __in size_t buffer_size - ); + __in size_t buffer_size); #endif /* EFSYS_OPT_HUNTINGTON | EFSYS_OPT_SIENA */ @@ -227,8 +218,7 @@ efx_lic_v3_find_start( __in_bcount(buffer_size) caddr_t bufferp, __in size_t buffer_size, - __out uint32_t *startp - ); + __out uint32_t *startp); __checkReturn efx_rc_t efx_lic_v3_find_end( @@ -237,8 +227,7 @@ efx_lic_v3_find_end( caddr_t bufferp, __in size_t buffer_size, __in uint32_t offset, - __out uint32_t *endp - ); + __out uint32_t *endp); __checkReturn __success(return != B_FALSE) boolean_t efx_lic_v3_find_key( @@ -248,15 +237,13 @@ efx_lic_v3_find_key( __in size_t buffer_size, __in uint32_t offset, __out uint32_t *startp, - __out uint32_t *lengthp - ); + __out uint32_t *lengthp); __checkReturn __success(return != B_FALSE) boolean_t efx_lic_v3_validate_key( __in efx_nic_t *enp, __in_bcount(length) caddr_t keyp, - __in uint32_t length - ); + __in uint32_t length); __checkReturn efx_rc_t efx_lic_v3_read_key( @@ -269,8 +256,7 @@ efx_lic_v3_read_key( __out_bcount_part(key_max_size, *lengthp) caddr_t keyp, __in size_t key_max_size, - __out uint32_t *lengthp - ); + __out uint32_t *lengthp); __checkReturn efx_rc_t efx_lic_v3_write_key( @@ -281,8 +267,7 @@ efx_lic_v3_write_key( __in uint32_t offset, __in_bcount(length) caddr_t keyp, __in uint32_t length, - __out uint32_t *lengthp - ); + __out uint32_t *lengthp); __checkReturn efx_rc_t efx_lic_v3_delete_key( @@ -293,31 +278,28 @@ efx_lic_v3_delete_key( __in uint32_t offset, __in uint32_t length, __in uint32_t end, - __out uint32_t *deltap - ); + __out uint32_t *deltap); __checkReturn efx_rc_t efx_lic_v3_create_partition( __in efx_nic_t *enp, __in_bcount(buffer_size) caddr_t bufferp, - __in size_t buffer_size - ); + __in size_t buffer_size); __checkReturn efx_rc_t efx_lic_v3_finish_partition( __in efx_nic_t *enp, __in_bcount(buffer_size) caddr_t bufferp, - __in size_t buffer_size - ); + __in size_t buffer_size); 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 */ efx_mcdi_licensing_v3_get_id, /* elo_get_id */ - efx_lic_v3_find_start, /* elo_find_start*/ + efx_lic_v3_find_start, /* elo_find_start */ efx_lic_v3_find_end, /* elo_find_end */ efx_lic_v3_find_key, /* elo_find_key */ efx_lic_v3_validate_key, /* elo_validate_key */ @@ -452,8 +434,8 @@ fail1: * Length (L): 16bit - value length in bytes * Value (V): L bytes - payload */ -#define EFX_LICENSE_V1V2_PAYLOAD_LENGTH_MAX (256) -#define EFX_LICENSE_V1V2_HEADER_LENGTH (2 * sizeof(uint16_t)) +#define EFX_LICENSE_V1V2_PAYLOAD_LENGTH_MAX (256) +#define EFX_LICENSE_V1V2_HEADER_LENGTH (2 * sizeof (uint16_t)) __checkReturn efx_rc_t efx_lic_v1v2_find_start( @@ -461,8 +443,7 @@ efx_lic_v1v2_find_start( __in_bcount(buffer_size) caddr_t bufferp, __in size_t buffer_size, - __out uint32_t *startp - ) + __out uint32_t *startp) { _NOTE(ARGUNUSED(enp, bufferp, buffer_size)) @@ -477,8 +458,7 @@ efx_lic_v1v2_find_end( caddr_t bufferp, __in size_t buffer_size, __in uint32_t offset, - __out uint32_t *endp - ) + __out uint32_t *endp) { _NOTE(ARGUNUSED(enp, bufferp, buffer_size)) @@ -494,8 +474,7 @@ efx_lic_v1v2_find_key( __in size_t buffer_size, __in uint32_t offset, __out uint32_t *startp, - __out uint32_t *lengthp - ) + __out uint32_t *lengthp) { boolean_t found; uint16_t tlv_type; @@ -528,8 +507,7 @@ fail1: efx_lic_v1v2_validate_key( __in efx_nic_t *enp, __in_bcount(length) caddr_t keyp, - __in uint32_t length - ) + __in uint32_t length) { uint16_t tlv_type; uint16_t tlv_length; @@ -579,8 +557,7 @@ efx_lic_v1v2_read_key( __out_bcount_part(key_max_size, *lengthp) caddr_t keyp, __in size_t key_max_size, - __out uint32_t *lengthp - ) + __out uint32_t *lengthp) { efx_rc_t rc; @@ -613,8 +590,7 @@ efx_lic_v1v2_write_key( __in uint32_t offset, __in_bcount(length) caddr_t keyp, __in uint32_t length, - __out uint32_t *lengthp - ) + __out uint32_t *lengthp) { efx_rc_t rc; @@ -650,8 +626,7 @@ efx_lic_v1v2_delete_key( __in uint32_t offset, __in uint32_t length, __in uint32_t end, - __out uint32_t *deltap - ) + __out uint32_t *deltap) { uint32_t move_start = offset + length; uint32_t move_length = end - move_start; @@ -672,8 +647,7 @@ efx_lic_v1v2_create_partition( __in efx_nic_t *enp, __in_bcount(buffer_size) caddr_t bufferp, - __in size_t buffer_size - ) + __in size_t buffer_size) { _NOTE(ARGUNUSED(enp)) EFSYS_ASSERT(EFX_LICENSE_V1V2_HEADER_LENGTH <= buffer_size); @@ -689,8 +663,7 @@ efx_lic_v1v2_finish_partition( __in efx_nic_t *enp, __in_bcount(buffer_size) caddr_t bufferp, - __in size_t buffer_size - ) + __in size_t buffer_size) { _NOTE(ARGUNUSED(enp, bufferp, buffer_size)) @@ -1002,7 +975,8 @@ efx_mcdi_licensing_v3_app_state( goto fail1; } - if (req.emr_out_length_used < MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_LEN) { + if (req.emr_out_length_used < + MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_LEN) { rc = EMSGSIZE; goto fail2; } @@ -1052,7 +1026,8 @@ efx_mcdi_licensing_v3_get_id( req.emr_in_buf = bufferp; req.emr_in_length = MC_CMD_LICENSING_GET_ID_V3_IN_LEN; req.emr_out_buf = bufferp; - req.emr_out_length = MIN(buffer_size, MC_CMD_LICENSING_GET_ID_V3_OUT_LENMAX); + req.emr_out_length = + MIN(buffer_size, MC_CMD_LICENSING_GET_ID_V3_OUT_LENMAX); (void) memset(bufferp, 0, req.emr_out_length); } @@ -1069,12 +1044,14 @@ efx_mcdi_licensing_v3_get_id( } *typep = MCDI_OUT_DWORD(req, LICENSING_GET_ID_V3_OUT_LICENSE_TYPE); - *lengthp = MCDI_OUT_DWORD(req, LICENSING_GET_ID_V3_OUT_LICENSE_ID_LENGTH); + *lengthp = + MCDI_OUT_DWORD(req, LICENSING_GET_ID_V3_OUT_LICENSE_ID_LENGTH); if (bufferp == NULL) { - /* modify length requirements to indicate to caller the extra buffering - ** needed to read the complete output. - */ + /* + * Modify length requirements to indicate to caller the extra + * buffering needed to read the complete output. + */ *lengthp += MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN; } else { /* Shift ID down to start of buffer */ @@ -1096,8 +1073,8 @@ fail1: } /* V3 format uses Huntington TLV format partition. See SF-108797-SW */ -#define EFX_LICENSE_V3_KEY_LENGTH_MIN (64) -#define EFX_LICENSE_V3_KEY_LENGTH_MAX (160) +#define EFX_LICENSE_V3_KEY_LENGTH_MIN (64) +#define EFX_LICENSE_V3_KEY_LENGTH_MAX (160) __checkReturn efx_rc_t efx_lic_v3_find_start( @@ -1105,12 +1082,12 @@ efx_lic_v3_find_start( __in_bcount(buffer_size) caddr_t bufferp, __in size_t buffer_size, - __out uint32_t *startp - ) + __out uint32_t *startp) { _NOTE(ARGUNUSED(enp)) - return ef10_nvram_buffer_find_item_start(bufferp, buffer_size, startp); + return (ef10_nvram_buffer_find_item_start(bufferp, buffer_size, + startp)); } __checkReturn efx_rc_t @@ -1120,12 +1097,11 @@ efx_lic_v3_find_end( caddr_t bufferp, __in size_t buffer_size, __in uint32_t offset, - __out uint32_t *endp - ) + __out uint32_t *endp) { _NOTE(ARGUNUSED(enp)) - return ef10_nvram_buffer_find_end(bufferp, buffer_size, offset, endp); + return (ef10_nvram_buffer_find_end(bufferp, buffer_size, offset, endp)); } __checkReturn __success(return != B_FALSE) boolean_t @@ -1136,8 +1112,7 @@ efx_lic_v3_find_key( __in size_t buffer_size, __in uint32_t offset, __out uint32_t *startp, - __out uint32_t *lengthp - ) + __out uint32_t *lengthp) { _NOTE(ARGUNUSED(enp)) @@ -1149,8 +1124,7 @@ efx_lic_v3_find_key( efx_lic_v3_validate_key( __in efx_nic_t *enp, __in_bcount(length) caddr_t keyp, - __in uint32_t length - ) + __in uint32_t length) { /* Check key is a valid V3 key */ uint8_t key_type; @@ -1200,8 +1174,7 @@ efx_lic_v3_read_key( __out_bcount_part(key_max_size, *lengthp) caddr_t keyp, __in size_t key_max_size, - __out uint32_t *lengthp - ) + __out uint32_t *lengthp) { _NOTE(ARGUNUSED(enp)) @@ -1218,8 +1191,7 @@ efx_lic_v3_write_key( __in uint32_t offset, __in_bcount(length) caddr_t keyp, __in uint32_t length, - __out uint32_t *lengthp - ) + __out uint32_t *lengthp) { _NOTE(ARGUNUSED(enp)) EFSYS_ASSERT(length <= EFX_LICENSE_V3_KEY_LENGTH_MAX); @@ -1237,8 +1209,7 @@ efx_lic_v3_delete_key( __in uint32_t offset, __in uint32_t length, __in uint32_t end, - __out uint32_t *deltap - ) + __out uint32_t *deltap) { efx_rc_t rc; @@ -1264,8 +1235,7 @@ efx_lic_v3_create_partition( __in efx_nic_t *enp, __in_bcount(buffer_size) caddr_t bufferp, - __in size_t buffer_size - ) + __in size_t buffer_size) { efx_rc_t rc; @@ -1290,8 +1260,7 @@ efx_lic_v3_finish_partition( __in efx_nic_t *enp, __in_bcount(buffer_size) caddr_t bufferp, - __in size_t buffer_size - ) + __in size_t buffer_size) { efx_rc_t rc; @@ -1383,7 +1352,7 @@ efx_lic_check_support( EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_LIC); - return enp->en_licensing_supported; + return (enp->en_licensing_supported); } void @@ -1474,8 +1443,7 @@ efx_lic_get_id( __in size_t buffer_size, __out uint32_t *typep, __out size_t *lengthp, - __out_opt uint8_t *bufferp - ) + __out_opt uint8_t *bufferp) { const efx_lic_ops_t *elop = enp->en_elop; efx_rc_t rc; @@ -1498,7 +1466,10 @@ fail1: return (rc); } -/* Buffer management API - abstracts varying TLV format used for License partition */ +/* + * Buffer management API - abstracts varying TLV format used for License + * partition. + */ __checkReturn efx_rc_t efx_lic_find_start( @@ -1506,8 +1477,7 @@ efx_lic_find_start( __in_bcount(buffer_size) caddr_t bufferp, __in size_t buffer_size, - __out uint32_t *startp - ) + __out uint32_t *startp) { const efx_lic_ops_t *elop = enp->en_elop; efx_rc_t rc; @@ -1533,8 +1503,7 @@ efx_lic_find_end( caddr_t bufferp, __in size_t buffer_size, __in uint32_t offset, - __out uint32_t *endp - ) + __out uint32_t *endp) { const efx_lic_ops_t *elop = enp->en_elop; efx_rc_t rc; @@ -1542,7 +1511,8 @@ efx_lic_find_end( EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_LIC); - if ((rc = elop->elo_find_end(enp, bufferp, buffer_size, offset, endp)) != 0) + rc = elop->elo_find_end(enp, bufferp, buffer_size, offset, endp); + if (rc != 0) goto fail1; return (0); @@ -1561,8 +1531,7 @@ efx_lic_find_key( __in size_t buffer_size, __in uint32_t offset, __out uint32_t *startp, - __out uint32_t *lengthp - ) + __out uint32_t *lengthp) { const efx_lic_ops_t *elop = enp->en_elop; @@ -1578,15 +1547,15 @@ efx_lic_find_key( } -/* Validate that the buffer contains a single key in a recognised format. -** An empty or terminator buffer is not accepted as a valid key. -*/ +/* + * Validate that the buffer contains a single key in a recognised format. + * An empty or terminator buffer is not accepted as a valid key. + */ __checkReturn __success(return != B_FALSE) boolean_t efx_lic_validate_key( __in efx_nic_t *enp, __in_bcount(length) caddr_t keyp, - __in uint32_t length - ) + __in uint32_t length) { const efx_lic_ops_t *elop = enp->en_elop; boolean_t rc; @@ -1616,8 +1585,7 @@ efx_lic_read_key( __out_bcount_part(key_max_size, *lengthp) caddr_t keyp, __in size_t key_max_size, - __out uint32_t *lengthp - ) + __out uint32_t *lengthp) { const efx_lic_ops_t *elop = enp->en_elop; efx_rc_t rc; @@ -1646,8 +1614,7 @@ efx_lic_write_key( __in uint32_t offset, __in_bcount(length) caddr_t keyp, __in uint32_t length, - __out uint32_t *lengthp - ) + __out uint32_t *lengthp) { const efx_lic_ops_t *elop = enp->en_elop; efx_rc_t rc; @@ -1676,8 +1643,7 @@ efx_lic_delete_key( __in uint32_t offset, __in uint32_t length, __in uint32_t end, - __out uint32_t *deltap - ) + __out uint32_t *deltap) { const efx_lic_ops_t *elop = enp->en_elop; efx_rc_t rc; @@ -1702,8 +1668,7 @@ efx_lic_create_partition( __in efx_nic_t *enp, __in_bcount(buffer_size) caddr_t bufferp, - __in size_t buffer_size - ) + __in size_t buffer_size) { const efx_lic_ops_t *elop = enp->en_elop; efx_rc_t rc; @@ -1728,8 +1693,7 @@ efx_lic_finish_partition( __in efx_nic_t *enp, __in_bcount(buffer_size) caddr_t bufferp, - __in size_t buffer_size - ) + __in size_t buffer_size) { const efx_lic_ops_t *elop = enp->en_elop; efx_rc_t rc; diff --git a/drivers/net/sfc/base/efx_mcdi.h b/drivers/net/sfc/base/efx_mcdi.h index 2172771321..fba807aa51 100644 --- a/drivers/net/sfc/base/efx_mcdi.h +++ b/drivers/net/sfc/base/efx_mcdi.h @@ -51,7 +51,7 @@ struct efx_mcdi_req_s { unsigned int emr_cmd; uint8_t *emr_in_buf; size_t emr_in_length; - /* Outputs: retcode, buffer, length, and length used*/ + /* Outputs: retcode, buffer, length, and length used */ efx_rc_t emr_rc; uint8_t *emr_out_buf; size_t emr_out_length; diff --git a/drivers/net/sfc/base/efx_nic.c b/drivers/net/sfc/base/efx_nic.c index 76caa744c6..489661998a 100644 --- a/drivers/net/sfc/base/efx_nic.c +++ b/drivers/net/sfc/base/efx_nic.c @@ -637,9 +637,9 @@ efx_nic_get_fw_version( goto fail2; rc = efx_mcdi_get_capabilities(enp, NULL, - &enfip->enfi_rx_dpcpu_fw_id, - &enfip->enfi_tx_dpcpu_fw_id, - NULL, NULL); + &enfip->enfi_rx_dpcpu_fw_id, + &enfip->enfi_tx_dpcpu_fw_id, + NULL, NULL); if (rc == 0) { enfip->enfi_dpcpu_fw_ids_valid = B_TRUE; } else if (rc == ENOTSUP) { @@ -650,7 +650,8 @@ efx_nic_get_fw_version( goto fail3; } - memcpy(enfip->enfi_mc_fw_version, mc_fw_version, sizeof(mc_fw_version)); + memcpy(enfip->enfi_mc_fw_version, mc_fw_version, + sizeof (mc_fw_version)); return (0); diff --git a/drivers/net/sfc/base/efx_types.h b/drivers/net/sfc/base/efx_types.h index b8ee14a6a8..4afa8de68b 100644 --- a/drivers/net/sfc/base/efx_types.h +++ b/drivers/net/sfc/base/efx_types.h @@ -116,7 +116,8 @@ extern "C" { #define EFX_DWORD_3_LBN 96 #define EFX_DWORD_3_WIDTH 32 -/* There are intentionally no EFX_QWORD_0 or EFX_QWORD_1 field definitions +/* + * There are intentionally no EFX_QWORD_0 or EFX_QWORD_1 field definitions * here as the implementaion of EFX_QWORD_FIELD and EFX_OWORD_FIELD do not * support field widths larger than 32 bits. */ diff --git a/drivers/net/sfc/base/medford_nic.c b/drivers/net/sfc/base/medford_nic.c index d361d654d2..94ba70cf2c 100644 --- a/drivers/net/sfc/base/medford_nic.c +++ b/drivers/net/sfc/base/medford_nic.c @@ -178,7 +178,8 @@ medford_board_cfg( if (EFX_PCI_FUNCTION_IS_PF(encp)) { rc = efx_mcdi_get_mac_address_pf(enp, mac_addr); #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC - /* Disable static config checking for Medford NICs, ONLY + /* + * Disable static config checking for Medford NICs, ONLY * for manufacturing test and setup at the factory, to * allow the static config to be installed. */