bnxt: clean up empty lines in .c and .h files

This commit is contained in:
mjg 2020-09-01 21:43:23 +00:00
parent 0ed2902b96
commit a000349dda
4 changed files with 7 additions and 25 deletions

View File

@ -413,7 +413,6 @@ struct bnxt_vf_info {
bus_addr_t hwrm_cmd_req_dma_addr; bus_addr_t hwrm_cmd_req_dma_addr;
}; };
#define BNXT_PF(softc) (!((softc)->flags & BNXT_FLAG_VF)) #define BNXT_PF(softc) (!((softc)->flags & BNXT_FLAG_VF))
#define BNXT_VF(softc) ((softc)->flags & BNXT_FLAG_VF) #define BNXT_VF(softc) ((softc)->flags & BNXT_FLAG_VF)

View File

@ -263,7 +263,6 @@ bnxt_hwrm_queue_qportcfg(struct bnxt_softc *softc)
return (rc); return (rc);
} }
int int
bnxt_hwrm_ver_get(struct bnxt_softc *softc) bnxt_hwrm_ver_get(struct bnxt_softc *softc)
{ {
@ -377,7 +376,6 @@ bnxt_hwrm_func_drv_rgtr(struct bnxt_softc *softc)
return hwrm_send_message(softc, &req, sizeof(req)); return hwrm_send_message(softc, &req, sizeof(req));
} }
int int
bnxt_hwrm_func_drv_unrgtr(struct bnxt_softc *softc, bool shutdown) bnxt_hwrm_func_drv_unrgtr(struct bnxt_softc *softc, bool shutdown)
{ {
@ -390,7 +388,6 @@ bnxt_hwrm_func_drv_unrgtr(struct bnxt_softc *softc, bool shutdown)
return hwrm_send_message(softc, &req, sizeof(req)); return hwrm_send_message(softc, &req, sizeof(req));
} }
static inline int static inline int
_is_valid_ether_addr(uint8_t *addr) _is_valid_ether_addr(uint8_t *addr)
{ {
@ -529,7 +526,6 @@ bnxt_hwrm_set_link_common(struct bnxt_softc *softc,
req->flags |= htole32(HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESET_PHY); req->flags |= htole32(HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESET_PHY);
} }
static void static void
bnxt_hwrm_set_pause_common(struct bnxt_softc *softc, bnxt_hwrm_set_pause_common(struct bnxt_softc *softc,
struct hwrm_port_phy_cfg_input *req) struct hwrm_port_phy_cfg_input *req)
@ -559,7 +555,6 @@ bnxt_hwrm_set_pause_common(struct bnxt_softc *softc,
} }
} }
/* JFV this needs interface connection */ /* JFV this needs interface connection */
static void static void
bnxt_hwrm_set_eee(struct bnxt_softc *softc, struct hwrm_port_phy_cfg_input *req) bnxt_hwrm_set_eee(struct bnxt_softc *softc, struct hwrm_port_phy_cfg_input *req)
@ -586,7 +581,6 @@ bnxt_hwrm_set_eee(struct bnxt_softc *softc, struct hwrm_port_phy_cfg_input *req)
} }
} }
int int
bnxt_hwrm_set_link_setting(struct bnxt_softc *softc, bool set_pause, bnxt_hwrm_set_link_setting(struct bnxt_softc *softc, bool set_pause,
bool set_eee, bool set_link) bool set_eee, bool set_link)
@ -598,7 +592,7 @@ bnxt_hwrm_set_link_setting(struct bnxt_softc *softc, bool set_pause,
return ENOTSUP; return ENOTSUP;
bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_PORT_PHY_CFG); bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_PORT_PHY_CFG);
if (set_pause) { if (set_pause) {
bnxt_hwrm_set_pause_common(softc, &req); bnxt_hwrm_set_pause_common(softc, &req);
@ -608,10 +602,10 @@ bnxt_hwrm_set_link_setting(struct bnxt_softc *softc, bool set_pause,
if (set_link) if (set_link)
bnxt_hwrm_set_link_common(softc, &req); bnxt_hwrm_set_link_common(softc, &req);
if (set_eee) if (set_eee)
bnxt_hwrm_set_eee(softc, &req); bnxt_hwrm_set_eee(softc, &req);
BNXT_HWRM_LOCK(softc); BNXT_HWRM_LOCK(softc);
rc = _hwrm_send_message(softc, &req, sizeof(req)); rc = _hwrm_send_message(softc, &req, sizeof(req));
@ -905,7 +899,6 @@ bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt_softc *softc,
return hwrm_send_message(softc, &req, sizeof(req)); return hwrm_send_message(softc, &req, sizeof(req));
} }
int int
bnxt_hwrm_set_filter(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic) bnxt_hwrm_set_filter(struct bnxt_softc *softc, struct bnxt_vnic_info *vnic)
{ {
@ -966,7 +959,7 @@ int
bnxt_cfg_async_cr(struct bnxt_softc *softc) bnxt_cfg_async_cr(struct bnxt_softc *softc)
{ {
int rc = 0; int rc = 0;
if (BNXT_PF(softc)) { if (BNXT_PF(softc)) {
struct hwrm_func_cfg_input req = {0}; struct hwrm_func_cfg_input req = {0};
@ -1569,7 +1562,7 @@ bnxt_hwrm_port_phy_qcfg(struct bnxt_softc *softc)
* 3. When the auto_mode is set to none and this flag is set to 1, * 3. When the auto_mode is set to none and this flag is set to 1,
* auto_pause bits should be ignored and should be set to 0. * auto_pause bits should be ignored and should be set to 0.
*/ */
link_info->flow_ctrl.autoneg = false; link_info->flow_ctrl.autoneg = false;
link_info->flow_ctrl.tx = false; link_info->flow_ctrl.tx = false;
link_info->flow_ctrl.rx = false; link_info->flow_ctrl.rx = false;
@ -1697,7 +1690,6 @@ static void bnxt_hwrm_set_coal_params(struct bnxt_softc *softc, uint32_t max_fra
req->num_cmpl_aggr_int = htole16((uint16_t)max_frames * 4); req->num_cmpl_aggr_int = htole16((uint16_t)max_frames * 4);
} }
int bnxt_hwrm_set_coal(struct bnxt_softc *softc) int bnxt_hwrm_set_coal(struct bnxt_softc *softc)
{ {
int i, rc = 0; int i, rc = 0;
@ -1749,7 +1741,6 @@ int bnxt_hwrm_set_coal(struct bnxt_softc *softc)
buf_tmr_irq << 16 | buf_tmr, flags, &req_tx); buf_tmr_irq << 16 | buf_tmr, flags, &req_tx);
for (i = 0; i < softc->nrxqsets; i++) { for (i = 0; i < softc->nrxqsets; i++) {
req = &req_rx; req = &req_rx;
/* /*
@ -1768,8 +1759,6 @@ int bnxt_hwrm_set_coal(struct bnxt_softc *softc)
return rc; return rc;
} }
int bnxt_hwrm_func_rgtr_async_events(struct bnxt_softc *softc, unsigned long *bmap, int bnxt_hwrm_func_rgtr_async_events(struct bnxt_softc *softc, unsigned long *bmap,
int bmap_size) int bmap_size)
{ {

View File

@ -173,7 +173,6 @@ bnxt_create_tx_sysctls(struct bnxt_softc *softc, int txr)
if (!oid) if (!oid)
return ENOMEM; return ENOMEM;
SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO, SYSCTL_ADD_QUAD(&softc->hw_stats, SYSCTL_CHILDREN(oid), OID_AUTO,
"ucast_pkts", CTLFLAG_RD, &tx_stats[txr].tx_ucast_pkts, "ucast_pkts", CTLFLAG_RD, &tx_stats[txr].tx_ucast_pkts,
"unicast packets sent"); "unicast packets sent");
@ -651,7 +650,6 @@ bnxt_create_port_stats_sysctls(struct bnxt_softc *softc)
return 0; return 0;
} }
int int
bnxt_create_rx_sysctls(struct bnxt_softc *softc, int rxr) bnxt_create_rx_sysctls(struct bnxt_softc *softc, int rxr)
{ {
@ -1362,7 +1360,7 @@ bnxt_create_hw_lro_sysctls(struct bnxt_softc *softc)
softc, 0, bnxt_hw_lro_set_max_agg_segs, "A", softc, 0, bnxt_hw_lro_set_max_agg_segs, "A",
"Set Max Agg Seg Value (unit is Log2): " "Set Max Agg Seg Value (unit is Log2): "
"0 (= 1 seg) / 1 (= 2 segs) / ... / 31 (= 2^31 segs)"); "0 (= 1 seg) / 1 (= 2 segs) / ... / 31 (= 2^31 segs)");
SYSCTL_ADD_PROC(&softc->hw_lro_ctx, SYSCTL_CHILDREN(oid), OID_AUTO, SYSCTL_ADD_PROC(&softc->hw_lro_ctx, SYSCTL_CHILDREN(oid), OID_AUTO,
"max_aggs", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, "max_aggs", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT,
softc, 0, bnxt_hw_lro_set_max_aggs, "A", softc, 0, bnxt_hw_lro_set_max_aggs, "A",

View File

@ -713,7 +713,6 @@ bnxt_attach_pre(if_ctx_t ctx)
if (rc) if (rc)
goto dma_fail; goto dma_fail;
/* Get firmware version and compare with driver */ /* Get firmware version and compare with driver */
softc->ver_info = malloc(sizeof(struct bnxt_ver_info), softc->ver_info = malloc(sizeof(struct bnxt_ver_info),
M_DEVBUF, M_NOWAIT | M_ZERO); M_DEVBUF, M_NOWAIT | M_ZERO);
@ -1094,7 +1093,6 @@ bnxt_init(if_ctx_t ctx)
rc = bnxt_hwrm_ring_grp_alloc(softc, &softc->grp_info[i]); rc = bnxt_hwrm_ring_grp_alloc(softc, &softc->grp_info[i]);
if (rc) if (rc)
goto fail; goto fail;
} }
/* Allocate the VNIC RSS context */ /* Allocate the VNIC RSS context */
@ -1250,7 +1248,6 @@ bnxt_media_status(if_ctx_t ctx, struct ifmediareq * ifmr)
uint64_t target_baudrate = bnxt_get_baudrate(link_info); uint64_t target_baudrate = bnxt_get_baudrate(link_info);
int active_media = IFM_UNKNOWN; int active_media = IFM_UNKNOWN;
bnxt_update_link(softc, true); bnxt_update_link(softc, true);
ifmr->ifm_status = IFM_AVALID; ifmr->ifm_status = IFM_AVALID;
@ -1655,7 +1652,6 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t data)
int rc = ENOTSUP; int rc = ENOTSUP;
struct bnxt_ioctl_data iod_storage, *iod = &iod_storage; struct bnxt_ioctl_data iod_storage, *iod = &iod_storage;
switch (command) { switch (command) {
case SIOCGPRIVATE_0: case SIOCGPRIVATE_0:
if ((rc = priv_check(curthread, PRIV_DRIVER)) != 0) if ((rc = priv_check(curthread, PRIV_DRIVER)) != 0)
@ -2086,7 +2082,7 @@ bnxt_add_media_types(struct bnxt_softc *softc)
BNXT_IFMEDIA_ADD(supported, SPEEDS_100MB, IFM_100_T); BNXT_IFMEDIA_ADD(supported, SPEEDS_100MB, IFM_100_T);
BNXT_IFMEDIA_ADD(supported, SPEEDS_10MB, IFM_10_T); BNXT_IFMEDIA_ADD(supported, SPEEDS_10MB, IFM_10_T);
break; break;
case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKX: case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKX:
BNXT_IFMEDIA_ADD(supported, SPEEDS_10GB, IFM_10G_KR); BNXT_IFMEDIA_ADD(supported, SPEEDS_10GB, IFM_10G_KR);
BNXT_IFMEDIA_ADD(supported, SPEEDS_2_5GB, IFM_2500_KX); BNXT_IFMEDIA_ADD(supported, SPEEDS_2_5GB, IFM_2500_KX);