From: Chiqijun chiqijun@huawei.com
driver inclusion category: bugfix bugzilla: 4472
-----------------------------------------------------------------------
Fix misspelled word and wrong print format.
Signed-off-by: Chiqijun chiqijun@huawei.com Reviewed-by: Zengweiliang zengweiliang.zengweiliang@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- .../net/ethernet/huawei/hinic/hinic_api_cmd.c | 4 +- drivers/net/ethernet/huawei/hinic/hinic_cfg.c | 20 +++--- .../net/ethernet/huawei/hinic/hinic_cmdq.c | 4 +- drivers/net/ethernet/huawei/hinic/hinic_dcb.c | 34 +++++----- drivers/net/ethernet/huawei/hinic/hinic_eqs.c | 4 +- .../net/ethernet/huawei/hinic/hinic_ethtool.c | 20 +++--- .../net/ethernet/huawei/hinic/hinic_hwdev.c | 40 +++++------ drivers/net/ethernet/huawei/hinic/hinic_lld.c | 20 +++--- .../net/ethernet/huawei/hinic/hinic_main.c | 6 +- .../net/ethernet/huawei/hinic/hinic_mbox.c | 9 +-- .../net/ethernet/huawei/hinic/hinic_mgmt.c | 20 +++--- .../net/ethernet/huawei/hinic/hinic_nic_cfg.c | 34 +++++----- .../net/ethernet/huawei/hinic/hinic_nic_dbg.c | 6 +- .../net/ethernet/huawei/hinic/hinic_nic_io.c | 2 +- .../net/ethernet/huawei/hinic/hinic_nictool.c | 68 +++++++++---------- .../ethernet/huawei/hinic/hinic_port_cmd.h | 2 +- .../net/ethernet/huawei/hinic/hinic_sriov.c | 4 +- drivers/net/ethernet/huawei/hinic/hinic_tx.c | 4 +- drivers/net/ethernet/huawei/hinic/hinic_wq.c | 2 +- 19 files changed, 154 insertions(+), 149 deletions(-)
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_api_cmd.c b/drivers/net/ethernet/huawei/hinic/hinic_api_cmd.c index 5a1e8655be38..6ce69dc73064 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_api_cmd.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_api_cmd.c @@ -129,7 +129,7 @@ static void dump_api_chain_reg(struct hinic_api_cmd_chain *chain) addr = HINIC_CSR_API_CMD_STATUS_0_ADDR(chain->chain_type); val = hinic_hwif_read_reg(chain->hwdev->hwif, addr);
- sdk_err(dev, "Chain type: 0x%x, cpld error: 0x%x, check error: 0x%x, current fsm: 0x%x\n", + sdk_err(dev, "Chain type: 0x%x, cpld error: 0x%x, check error: 0x%x, current fsm: 0x%x\n", chain->chain_type, HINIC_API_CMD_STATUS_GET(val, CPLD_ERR), HINIC_API_CMD_STATUS_GET(val, CHKSUM_ERR), HINIC_API_CMD_STATUS_GET(val, FSM)); @@ -161,7 +161,7 @@ static int chain_busy(struct hinic_api_cmd_chain *chain) resp_header = be64_to_cpu(ctxt->resp->header); if (ctxt->status && !HINIC_API_CMD_RESP_HEADER_VALID(resp_header)) { - sdk_err(dev, "Context(0x%x) busy!, pi: %d, resp_header: 0x%08x%08x\n", + sdk_err(dev, "Context(0x%x) busy, pi: %d, resp_header: 0x%08x%08x\n", ctxt->status, chain->prod_idx, upper_32_bits(resp_header), lower_32_bits(resp_header)); diff --git a/drivers/net/ethernet/huawei/hinic/hinic_cfg.c b/drivers/net/ethernet/huawei/hinic/hinic_cfg.c index 18937d7d9057..303225e5689e 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_cfg.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_cfg.c @@ -629,7 +629,7 @@ static int get_cap_from_pf(struct hinic_hwdev *dev, enum func_type type) err = hinic_msg_to_mgmt_sync(dev, HINIC_MOD_CFGM, HINIC_CFG_MBOX_CAP, &dev_cap, in_len, &dev_cap, &out_len, 0); if (err || dev_cap.status || !out_len) { - sdk_err(dev->dev_hdl, "Failed to get capability from PF, err: %d, status: 0x%x, out size: 0x%x\n", + sdk_err(dev->dev_hdl, "Failed to get capability from PF, err: %d, status: 0x%x, out size: 0x%x\n", err, dev_cap.status, out_len); return -EFAULT; } @@ -925,7 +925,7 @@ int hinic_vector_to_eqn(void *hwdev, enum hinic_service_type type, int vector)
if (type != SERVICE_T_ROCE && type != SERVICE_T_IWARP) { sdk_err(dev->dev_hdl, - "Service type :%d, only RDMA service could get eqn by vector.\n", + "Service type: %d, only RDMA service could get eqn by vector\n", type); return -EINVAL; } @@ -982,7 +982,7 @@ static int cfg_enable_interrupt(struct hinic_hwdev *dev)
irq_info = cfg_mgmt->irq_param_info.alloc_info;
- sdk_info(dev->dev_hdl, "Interrupt type: %d, irq num: %d.\n", + sdk_info(dev->dev_hdl, "Interrupt type: %d, irq num: %d\n", cfg_mgmt->svc_cap.interrupt_type, nreq);
switch (cfg_mgmt->svc_cap.interrupt_type) { @@ -1001,7 +1001,7 @@ static int cfg_enable_interrupt(struct hinic_hwdev *dev) actual_irq = pci_enable_msix_range(pcidev, entry, VECTOR_THRESHOLD, nreq); if (actual_irq < 0) { - sdk_err(dev->dev_hdl, "Alloc msix entries with threshold 2 failed.\n"); + sdk_err(dev->dev_hdl, "Alloc msix entries with threshold 2 failed\n"); kfree(entry); return -ENOMEM; } @@ -1009,7 +1009,7 @@ static int cfg_enable_interrupt(struct hinic_hwdev *dev) nreq = (u16)actual_irq; cfg_mgmt->irq_param_info.num_total = nreq; cfg_mgmt->irq_param_info.num_irq_remain = nreq; - sdk_info(dev->dev_hdl, "Request %d msix vector success.\n", + sdk_info(dev->dev_hdl, "Request %d msix vector success\n", nreq);
for (i = 0; i < nreq; ++i) { @@ -1059,12 +1059,12 @@ int hinic_alloc_irqs(void *hwdev, enum hinic_service_type type, u16 num, if (num > free_num_irq) { if (free_num_irq == 0) { sdk_err(dev->dev_hdl, - "no free irq resource in cfg mgmt.\n"); + "no free irq resource in cfg mgmt\n"); mutex_unlock(&irq_info->irq_mutex); return -ENOMEM; }
- sdk_warn(dev->dev_hdl, "only %d irq resource in cfg mgmt.\n", + sdk_warn(dev->dev_hdl, "only %d irq resource in cfg mgmt\n", free_num_irq); num = free_num_irq; } @@ -1125,7 +1125,7 @@ void hinic_free_irq(void *hwdev, enum hinic_service_type type, u32 irq_id) alloc_info[i].free = CFG_FREE; irq_info->num_irq_remain++; if (irq_info->num_irq_remain > max_num_irq) { - sdk_err(dev->dev_hdl, "Find target,but over range\n"); + sdk_err(dev->dev_hdl, "Find target, but over range\n"); mutex_unlock(&irq_info->irq_mutex); return; } @@ -1135,7 +1135,7 @@ void hinic_free_irq(void *hwdev, enum hinic_service_type type, u32 irq_id) }
if (i >= max_num_irq) - sdk_warn(dev->dev_hdl, "Irq %d don`t need to free\n", irq_id); + sdk_warn(dev->dev_hdl, "Irq %d don't need to free\n", irq_id);
mutex_unlock(&irq_info->irq_mutex); } @@ -1262,7 +1262,7 @@ void hinic_free_ceq(void *hwdev, enum hinic_service_type type, int ceq_id) }
if (i >= num_ceq) - sdk_warn(dev->dev_hdl, "ceq %d don`t need to free.\n", ceq_id); + sdk_warn(dev->dev_hdl, "ceq %d don't need to free\n", ceq_id);
mutex_unlock(&eq->eq_mutex); } diff --git a/drivers/net/ethernet/huawei/hinic/hinic_cmdq.c b/drivers/net/ethernet/huawei/hinic/hinic_cmdq.c index 7293ff216a7c..6d78d22272f0 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_cmdq.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_cmdq.c @@ -251,7 +251,7 @@ struct hinic_cmd_buf *hinic_alloc_cmd_buf(void *hwdev) void *dev;
if (!hwdev) { - pr_err("Failed to alloc cmd buf, Invalid hwdev\n"); + pr_err("Failed to alloc cmd buf, invalid hwdev\n"); return NULL; }
@@ -1516,7 +1516,7 @@ int hinic_cmdqs_init(struct hinic_hwdev *hwdev) err = init_cmdq(&cmdqs->cmdq[cmdq_type], hwdev, &cmdqs->saved_wqs[cmdq_type], cmdq_type); if (err) { - sdk_err(hwdev->dev_hdl, "Failed to initialize cmdq type :%d\n", + sdk_err(hwdev->dev_hdl, "Failed to initialize cmdq type: %d\n", cmdq_type); goto init_cmdq_err; } diff --git a/drivers/net/ethernet/huawei/hinic/hinic_dcb.c b/drivers/net/ethernet/huawei/hinic/hinic_dcb.c index e17a91f8bd59..0c7ae9133407 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_dcb.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_dcb.c @@ -338,8 +338,8 @@ u8 hinic_setup_dcb_tool(struct net_device *netdev, u8 *dcb_en, bool wr_flag)
if (wr_flag) { if (nic_dev->max_qps < nic_dev->dcb_cfg.pg_tcs && *dcb_en) { - netif_err(nic_dev, drv, netdev, - "max_qps:%d is less than %d\n", + nicif_err(nic_dev, drv, netdev, + "max_qps: %d is less than %d\n", nic_dev->max_qps, nic_dev->dcb_cfg.pg_tcs); return 1; } @@ -357,7 +357,7 @@ u8 hinic_setup_dcb_tool(struct net_device *netdev, u8 *dcb_en, bool wr_flag) mutex_lock(&nic_dev->nic_mutex);
if (!err) - netif_info(nic_dev, drv, netdev, "%s DCB\n", + nicif_info(nic_dev, drv, netdev, "%s DCB\n", *dcb_en ? "Enable" : "Disable"); } else { *dcb_en = (u8)test_bit(HINIC_DCB_ENABLE, &nic_dev->flags); @@ -386,15 +386,15 @@ static u8 hinic_dcbnl_set_state(struct net_device *netdev, u8 state) return 0;
if (nic_dev->max_qps < nic_dev->dcb_cfg.pg_tcs && state) { - netif_err(nic_dev, drv, netdev, - "max_qps:%d is less than %d\n", + nicif_err(nic_dev, drv, netdev, + "max_qps: %d is less than %d\n", nic_dev->max_qps, nic_dev->dcb_cfg.pg_tcs); return 1; }
err = hinic_setup_tc(netdev, state ? nic_dev->dcb_cfg.pg_tcs : 0); if (!err) - netif_info(nic_dev, drv, netdev, "%s DCB\n", + nicif_info(nic_dev, drv, netdev, "%s DCB\n", state ? "Enable" : "Disable");
return !!err; @@ -1062,12 +1062,12 @@ static int __set_hw_ets(struct hinic_nic_dev *nic_dev) err = hinic_dcb_set_ets(nic_dev->hwdev, up_tc, pg_bw, up_pgid, up_bw, up_strict); if (err) { - hinic_err(nic_dev, drv, "Failed to set ets with mode:%d\n", + hinic_err(nic_dev, drv, "Failed to set ets with mode: %d\n", nic_dev->dcbx_cap); return err; }
- hinic_info(nic_dev, drv, "Set ets to hw done with mode:%d\n", + hinic_info(nic_dev, drv, "Set ets to hw done with mode: %d\n", nic_dev->dcbx_cap);
return 0; @@ -1332,8 +1332,8 @@ static int hinic_dcbnl_ieee_set_ets(struct net_device *netdev, if (max_tc != netdev_get_num_tc(netdev)) { err = hinic_setup_tc(netdev, max_tc); if (err) { - netif_err(nic_dev, drv, netdev, - "Failed to setup tc with max_tc:%d, err:%d\n", + nicif_err(nic_dev, drv, netdev, + "Failed to setup tc with max_tc: %d, err: %d\n", max_tc, err); memcpy(my_ets, &back_ets, sizeof(struct ieee_ets)); return err; @@ -1386,7 +1386,7 @@ static int hinic_dcbnl_ieee_set_pfc(struct net_device *netdev, pfc_map = pfc->pfc_en & nic_dev->up_valid_bitmap; outof_range_pfc = pfc->pfc_en & (~nic_dev->up_valid_bitmap); if (outof_range_pfc) - netif_info(nic_dev, drv, netdev, + nicif_info(nic_dev, drv, netdev, "pfc setting out of range, 0x%x will be ignored\n", outof_range_pfc);
@@ -1407,7 +1407,7 @@ static int hinic_dcbnl_ieee_set_pfc(struct net_device *netdev, err = hinic_dcb_set_pfc(nic_dev->hwdev, pfc_en, pfc_map); if (err) { hinic_info(nic_dev, drv, - "Failed to set pfc to hw with pfc_map:0x%x err:%d\n", + "Failed to set pfc to hw with pfc_map: 0x%x err: %d\n", pfc_map, err); hinic_start_port_traffic_flow(nic_dev); return err; @@ -1416,7 +1416,7 @@ static int hinic_dcbnl_ieee_set_pfc(struct net_device *netdev, hinic_start_port_traffic_flow(nic_dev); my_pfc->pfc_en = pfc->pfc_en; hinic_info(nic_dev, drv, - "Set pfc successfully with pfc_map:0x%x, pfc_en:%d\n", + "Set pfc successfully with pfc_map: 0x%x, pfc_en: %d\n", pfc_map, pfc_en);
return 0; @@ -1479,7 +1479,7 @@ static u8 hinic_dcbnl_setdcbx(struct net_device *netdev, u8 mode) ((mode & DCB_CAP_DCBX_LLD_MANAGED) && (!(mode & DCB_CAP_DCBX_HOST)))) { nicif_info(nic_dev, drv, netdev, - "Set dcbx failed with invalid mode:%d\n", mode); + "Set dcbx failed with invalid mode: %d\n", mode); return 1; }
@@ -1497,7 +1497,7 @@ static u8 hinic_dcbnl_setdcbx(struct net_device *netdev, u8 mode) err = hinic_setup_tc(netdev, 0); if (err) { nicif_err(nic_dev, drv, netdev, - "Failed to setup tc with mode:%d\n", + "Failed to setup tc with mode: %d\n", mode); return 1; } @@ -1509,7 +1509,7 @@ static u8 hinic_dcbnl_setdcbx(struct net_device *netdev, u8 mode) err = hinic_setup_tc(netdev, 0); if (err) { nicif_err(nic_dev, drv, netdev, - "Failed to setup tc with mode:%d\n", mode); + "Failed to setup tc with mode: %d\n", mode); return 1; } } @@ -1617,7 +1617,7 @@ int __set_cos_up_map(struct hinic_nic_dev *nic_dev, u8 *cos_up) return -EFAULT; }
- nicif_info(nic_dev, drv, netdev, "Set cos2up:%d%d%d%d%d%d%d%d\n", + nicif_info(nic_dev, drv, netdev, "Set cos2up: %d%d%d%d%d%d%d%d\n", cos_up[0], cos_up[1], cos_up[2], cos_up[3], cos_up[4], cos_up[5], cos_up[6], cos_up[7]);
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_eqs.c b/drivers/net/ethernet/huawei/hinic/hinic_eqs.c index 22fc49d16462..6c352dff996a 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_eqs.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_eqs.c @@ -486,7 +486,7 @@ static void ceq_event_handler(struct hinic_ceqs *ceqs, u32 ceqe) u32 ceqe_data = CEQE_DATA(ceqe);
if (event >= HINIC_MAX_CEQ_EVENTS) { - sdk_err(hwdev->dev_hdl, "Ceq unknown event:%d, ceqe date: 0x%x\n", + sdk_err(hwdev->dev_hdl, "Ceq unknown event: %d, ceqe date: 0x%x\n", event, ceqe_data); return; } @@ -1126,7 +1126,7 @@ static int init_eq(struct hinic_eq *eq, struct hinic_hwdev *hwdev, u16 q_id, eq->orig_page_size = eq->page_size; eq->num_pages = GET_EQ_NUM_PAGES(eq, eq->page_size); if (eq->num_pages > HINIC_EQ_MAX_PAGES) { - sdk_err(hwdev->dev_hdl, "Number pages:%d too many pages for eq\n", + sdk_err(hwdev->dev_hdl, "Number pages: %d too many pages for eq\n", eq->num_pages); return -EINVAL; } diff --git a/drivers/net/ethernet/huawei/hinic/hinic_ethtool.c b/drivers/net/ethernet/huawei/hinic/hinic_ethtool.c index 98e230d4e3c1..f79594570002 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_ethtool.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_ethtool.c @@ -753,7 +753,7 @@ static int hinic_set_settings_to_hw(struct hinic_nic_dev *nic_dev, (autoneg ? "autong enable " : "autong disable ") : ""); if (err < 0 || err >= SET_LINK_STR_MAX_LEN) { nicif_err(nic_dev, drv, netdev, - "Failed snprintf link state, function return(%d) and dest_len(%d)\n", + "Failed to snprintf link state, function return(%d) and dest_len(%d)\n", err, SET_LINK_STR_MAX_LEN); return -EFAULT; } @@ -763,7 +763,7 @@ static int hinic_set_settings_to_hw(struct hinic_nic_dev *nic_dev, "%sspeed %d ", set_link_str, speed); if (err <= 0 || err >= SET_LINK_STR_MAX_LEN) { nicif_err(nic_dev, drv, netdev, - "Failed snprintf link speed, function return(%d) and dest_len(%d)\n", + "Failed to snprintf link speed, function return(%d) and dest_len(%d)\n", err, SET_LINK_STR_MAX_LEN); return -EFAULT; } @@ -897,7 +897,7 @@ static void hinic_get_drvinfo(struct net_device *netdev, "%s", mgmt_ver); if (err <= 0 || err >= (int)sizeof(info->fw_version)) nicif_err(nic_dev, drv, netdev, - "Failed snprintf fw_version, function return(%d) and dest_len(%d)\n", + "Failed to snprintf fw_version, function return(%d) and dest_len(%d)\n", err, (int)sizeof(info->fw_version)); }
@@ -997,7 +997,7 @@ static int hinic_set_ringparam(struct net_device *netdev, ring->rx_pending > HINIC_MAX_QUEUE_DEPTH || ring->rx_pending < HINIC_MIN_QUEUE_DEPTH) { nicif_err(nic_dev, drv, netdev, - "Queue depth out of rang [%d-%d]\n", + "Queue depth out of range [%d-%d]\n", HINIC_MIN_QUEUE_DEPTH, HINIC_MAX_QUEUE_DEPTH); return -EINVAL; } @@ -1449,7 +1449,7 @@ static int __hinic_set_coalesce(struct net_device *netdev, err = snprintf(obj_str, sizeof(obj_str), "for netdev"); if (err <= 0 || err >= OBJ_STR_MAX_LEN) { nicif_err(nic_dev, drv, netdev, - "Failed snprintf string, function return(%d) and dest_len(%d)\n", + "Failed to snprintf string, function return(%d) and dest_len(%d)\n", err, OBJ_STR_MAX_LEN); return -EFAULT; } @@ -1458,7 +1458,7 @@ static int __hinic_set_coalesce(struct net_device *netdev, err = snprintf(obj_str, sizeof(obj_str), "for queue %d", queue); if (err <= 0 || err >= OBJ_STR_MAX_LEN) { nicif_err(nic_dev, drv, netdev, - "Failed snprintf string, function return(%d) and dest_len(%d)\n", + "Failed to snprintf string, function return(%d) and dest_len(%d)\n", err, OBJ_STR_MAX_LEN); return -EFAULT; } @@ -1712,7 +1712,7 @@ static void hinic_get_strings(struct net_device *netdev, return; default: nicif_err(nic_dev, drv, netdev, - "Invalid string set %d.", stringset); + "Invalid string set %d", stringset); return; } } @@ -1913,7 +1913,7 @@ static int hinic_run_lp_test(struct hinic_nic_dev *nic_dev, u32 test_time) }
dev_kfree_skb_any(skb_tmp); - nicif_info(nic_dev, drv, netdev, "Loopback test succeed.\n"); + nicif_info(nic_dev, drv, netdev, "Loopback test succeed\n"); return 0; }
@@ -1961,7 +1961,7 @@ void hinic_lp_test(struct net_device *netdev, struct ethtool_test *eth_test, lb_test_rx_buf = vmalloc(LP_PKT_CNT * LP_PKT_LEN); if (!lb_test_rx_buf) { nicif_err(nic_dev, drv, netdev, - "Failed to alloc rx buffer for loopback test.\n"); + "Failed to alloc rx buffer for loopback test\n"); err = 1; } else { nic_dev->lb_test_rx_buf = lb_test_rx_buf; @@ -1980,7 +1980,7 @@ void hinic_lp_test(struct net_device *netdev, struct ethtool_test *eth_test, if (!(test.flags & ETH_TEST_FL_EXTERNAL_LB)) { if (hinic_set_loopback_mode(nic_dev->hwdev, false)) { nicif_err(nic_dev, drv, netdev, - "Failed to cancel port loopback mode after loopback test.\n"); + "Failed to cancel port loopback mode after loopback test\n"); err = 1;
goto resume_link; diff --git a/drivers/net/ethernet/huawei/hinic/hinic_hwdev.c b/drivers/net/ethernet/huawei/hinic/hinic_hwdev.c index e815eec59b45..d19da7238f9b 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_hwdev.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_hwdev.c @@ -1369,7 +1369,7 @@ int hinic_clean_root_ctxt(void *hwdev) &root_ctxt, &out_size, 0); if (err || !out_size || root_ctxt.status) { sdk_err(((struct hinic_hwdev *)hwdev)->dev_hdl, - "Failed to set root context, err: %d, status: 0x%x, out_size: 0x%x\n", + "Failed to clean root context, err: %d, status: 0x%x, out_size: 0x%x\n", err, root_ctxt.status, out_size); return -EFAULT; } @@ -1528,7 +1528,7 @@ static int hinic_vf_rx_tx_flush_in_pf(struct hinic_hwdev *hwdev, u16 vf_id) HINIC_MGMT_CMD_START_FLR, &clr_res, sizeof(clr_res), &clr_res, &out_size, 0); if (err || !out_size || clr_res.status) { - sdk_warn(hwdev->dev_hdl, "Failed to flush doorbell, err: %d, status: 0x%x, out_size: 0x%x\n", + sdk_warn(hwdev->dev_hdl, "Failed to start flr, err: %d, status: 0x%x, out_size: 0x%x\n", err, clr_res.status, out_size); ret = err ? err : (-EFAULT); } @@ -1759,7 +1759,7 @@ static int init_aeqs_msix_attr(struct hinic_hwdev *hwdev) info.msix_index = eq->eq_irq.msix_entry_idx; err = hinic_set_interrupt_cfg_direct(hwdev, &info); if (err) { - sdk_err(hwdev->dev_hdl, "Set msix attr for aeq %d failed\n", + sdk_err(hwdev->dev_hdl, "Failed to set msix attr for aeq %d\n", q_id); return -EFAULT; } @@ -1789,7 +1789,7 @@ static int init_ceqs_msix_attr(struct hinic_hwdev *hwdev) info.msix_index = eq->eq_irq.msix_entry_idx; err = hinic_set_interrupt_cfg(hwdev, info); if (err) { - sdk_err(hwdev->dev_hdl, "Set msix attr for ceq %d failed\n", + sdk_err(hwdev->dev_hdl, "Failed to set msix attr for ceq %d\n", q_id); return -EFAULT; } @@ -2032,7 +2032,7 @@ int comm_pf_mbox_handler(void *handle, u16 vf_id, u8 cmd, void *buf_in, if (!hinic_mbox_check_cmd_valid(handle, hw_cmd_support_vf, vf_id, cmd, buf_in, in_size, size)) { sdk_err(((struct hinic_hwdev *)handle)->dev_hdl, - "PF Receive VF(%d) common cmd(0x%x), mbox len(0x%x) is invalid\n", + "PF Receive VF(%d) common cmd(0x%x) or mbox len(0x%x) is invalid\n", vf_id + hinic_glb_pf_vf_offset(handle), cmd, in_size); err = HINIC_MBOX_VF_CMD_ERROR; return err; @@ -2050,8 +2050,8 @@ int comm_pf_mbox_handler(void *handle, u16 vf_id, u8 cmd, void *buf_in, if (err && err != HINIC_DEV_BUSY_ACTIVE_FW && err != HINIC_MBOX_PF_BUSY_ACTIVE_FW) sdk_err(((struct hinic_hwdev *)handle)->dev_hdl, - "PF mbox common callback handler err: %d\n", - err); + "PF mbox common cmd %d callback handler err: %d\n", + cmd, err); }
return err; @@ -2462,7 +2462,7 @@ int hinic_init_comm_ch(struct hinic_hwdev *hwdev)
err = __get_func_misc_info(hwdev); if (err) { - sdk_err(hwdev->dev_hdl, "Failed to get function msic information\n"); + sdk_err(hwdev->dev_hdl, "Failed to get function misc information\n"); goto get_func_info_err; }
@@ -3133,7 +3133,7 @@ int mqm_eqm_init(struct hinic_hwdev *hwdev) &info_eqm_fix, sizeof(info_eqm_fix), &info_eqm_fix, &len, 0); if (ret || !len || info_eqm_fix.status) { - sdk_err(hwdev->dev_hdl, "Get mqm fix info fail,err: %d, status: 0x%x, out_size: 0x%x\n", + sdk_err(hwdev->dev_hdl, "Get mqm fix info failed, err: %d, status: 0x%x, out_size: 0x%x\n", ret, info_eqm_fix.status, len); return -EFAULT; } @@ -3149,25 +3149,25 @@ int mqm_eqm_init(struct hinic_hwdev *hwdev) kcalloc(hwdev->mqm_att.chunk_num, sizeof(struct hinic_page_addr), GFP_KERNEL); if (!(hwdev->mqm_att.brm_srch_page_addr)) { - sdk_err(hwdev->dev_hdl, "Alloc virtual mem failed\r\n"); + sdk_err(hwdev->dev_hdl, "Alloc virtual mem failed\n"); return -EFAULT; }
ret = mqm_eqm_alloc_page_mem(hwdev); if (ret) { - sdk_err(hwdev->dev_hdl, "Alloc eqm page mem failed\r\n"); + sdk_err(hwdev->dev_hdl, "Alloc eqm page mem failed\n"); goto err_page; }
ret = mqm_eqm_set_page_2_hw(hwdev); if (ret) { - sdk_err(hwdev->dev_hdl, "Set page to hw failed\r\n"); + sdk_err(hwdev->dev_hdl, "Set page to hw failed\n"); goto err_ecmd; }
ret = mqm_eqm_set_cfg_2_hw(hwdev, 1); if (ret) { - sdk_err(hwdev->dev_hdl, "Set page to hw failed\r\n"); + sdk_err(hwdev->dev_hdl, "Set page to hw failed\n"); goto err_ecmd; }
@@ -3197,7 +3197,7 @@ void mqm_eqm_deinit(struct hinic_hwdev *hwdev)
ret = mqm_eqm_set_cfg_2_hw(hwdev, 0); if (ret) { - sdk_err(hwdev->dev_hdl, "Set mqm eqm cfg to chip fail! err: %d\n", + sdk_err(hwdev->dev_hdl, "Set mqm eqm cfg to chip fail, err: %d\n", ret); return; } @@ -3218,7 +3218,7 @@ int hinic_ppf_ext_db_init(void *dev)
ret = mqm_eqm_init(hwdev); if (ret) { - sdk_err(hwdev->dev_hdl, "MQM eqm init fail!\n"); + sdk_err(hwdev->dev_hdl, "MQM eqm init failed\n"); return -EFAULT; }
@@ -3425,7 +3425,7 @@ static void fault_report_show(struct hinic_hwdev *hwdev, struct hinic_fault_event_stats *fault; u8 node_id;
- sdk_err(hwdev->dev_hdl, "Fault event report received, func_id: %d.\n", + sdk_err(hwdev->dev_hdl, "Fault event report received, func_id: %d\n", hinic_global_func_id(hwdev));
memset(type_str, 0, FAULT_SHOW_STR_LEN + 1); @@ -3759,7 +3759,7 @@ static void sw_watchdog_timeout_info_show(struct hinic_hwdev *hwdev, u32 *dump_addr, *reg, stack_len, i, j;
if (in_size != sizeof(*watchdog_info)) { - sdk_err(hwdev->dev_hdl, "Invalid mgmt watchdog report, length: %d, should be %ld.\n", + sdk_err(hwdev->dev_hdl, "Invalid mgmt watchdog report, length: %d, should be %ld\n", in_size, sizeof(*watchdog_info)); return; } @@ -3924,7 +3924,7 @@ static void hinic_fmw_act_ntc_handler(struct hinic_hwdev *hwdev, struct hinic_fmw_act_ntc *notice_info;
if (in_size != sizeof(*notice_info)) { - sdk_err(hwdev->dev_hdl, "Invalid mgmt firmware active notice, length: %d, should be %ld.\n", + sdk_err(hwdev->dev_hdl, "Invalid mgmt firmware active notice, length: %d, should be %ld\n", in_size, sizeof(*notice_info)); return; } @@ -3957,7 +3957,7 @@ static void hinic_pcie_dfx_event_handler(struct hinic_hwdev *hwdev, u32 *reg;
if (in_size != sizeof(*notice_info)) { - sdk_err(hwdev->dev_hdl, "Invalid mgmt firmware active notice, length: %d, should be %ld.\n", + sdk_err(hwdev->dev_hdl, "Invalid mgmt firmware active notice, length: %d, should be %ld\n", in_size, sizeof(*notice_info)); return; } @@ -4724,7 +4724,7 @@ u8 hinic_nic_sw_aeqe_handler(void *handle, u8 event, u64 data) event_level = FAULT_LEVEL_FATAL; break; default: - sdk_err(hwdev->dev_hdl, "Unsupported sw event %d to process.\n", + sdk_err(hwdev->dev_hdl, "Unsupported sw event %d to process\n", event); }
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_lld.c b/drivers/net/ethernet/huawei/hinic/hinic_lld.c index 81461da5e9aa..a19a1f67bc97 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_lld.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_lld.c @@ -668,7 +668,7 @@ static void hinic_ignore_minor_version(char *version) err = snprintf(version, max_ver_len, "%s.%s.%s.0", ver_split[0], ver_split[1], ver_split[2]); if (err <= 0 || err >= max_ver_len) - pr_err("Failed snprintf version, function return(%d) and dest_len(%d)\n", + pr_err("Failed to snprintf version, function return(%d) and dest_len(%d)\n", err, max_ver_len); }
@@ -1087,7 +1087,7 @@ void *hinic_get_uld_dev_by_ifname(char *ifname, enum hinic_service_type type) struct hinic_pcidev *dev;
if (type >= SERVICE_T_MAX) { - pr_err("Service type :%d is error\n", type); + pr_err("Service type: %d is error\n", type); return NULL; }
@@ -1467,7 +1467,7 @@ struct net_device *hinic_get_netdev_by_lld(struct hinic_lld_dev *lld_dev) nic_dev = pci_adapter->uld_dev[SERVICE_T_NIC]; if (!nic_dev) { sdk_err(&pci_adapter->pcidev->dev, - "There's no net device attached on the pci device"); + "There's no net device attached on the pci device\n"); return NULL; }
@@ -1501,7 +1501,7 @@ struct net_device *hinic_get_netdev_by_pcidev(struct pci_dev *pdev) nic_dev = pci_adapter->uld_dev[SERVICE_T_NIC]; if (!nic_dev) { sdk_err(&pci_adapter->pcidev->dev, - "There`s no net device attached on the pci device"); + "There`s no net device attached on the pci device\n"); return NULL; }
@@ -1739,7 +1739,7 @@ int hinic_ovs_set_vf_nic_state(struct hinic_lld_dev *lld_dev, u16 vf_func_id,
if (err) { sdk_err(&des_dev->pcidev->dev, - "%s driver Set VF max_queue_num failed, err=%d.\n", + "%s driver Set VF max_queue_num failed, err=%d\n", s_uld_name[SERVICE_T_NIC], err);
break; @@ -2071,7 +2071,7 @@ static int alloc_chip_node(struct hinic_pcidev *pci_adapter) HINIC_CHIP_NAME, i); if (err <= 0 || err >= IFNAMSIZ) { sdk_err(&pci_adapter->pcidev->dev, - "Failed snprintf chip_name, function return(%d) and dest_len(%d)\n", + "Failed to snprintf chip_name, function return(%d) and dest_len(%d)\n", err, IFNAMSIZ); goto alloc_dbgtool_attr_file_err; } @@ -2080,7 +2080,7 @@ static int alloc_chip_node(struct hinic_pcidev *pci_adapter) IFNAMSIZ, "%s%d", HINIC_CHIP_NAME, i); if (err <= 0 || err >= IFNAMSIZ) { sdk_err(&pci_adapter->pcidev->dev, - "Failed snprintf dbgtool_attr_file_name, function return(%d) and dest_len(%d)\n", + "Failed to snprintf dbgtool_attr_file_name, function return(%d) and dest_len(%d)\n", err, IFNAMSIZ); goto alloc_dbgtool_attr_file_err; } @@ -2188,13 +2188,13 @@ int hinic_ovs_set_vf_load_state(struct pci_dev *pdev) { struct hinic_pcidev *pci_adapter; if (!pdev) { - pr_err("pdev is null.\n"); + pr_err("pdev is null\n"); return -EINVAL; }
pci_adapter = pci_get_drvdata(pdev); if (!pci_adapter) { - pr_err("pci_adapter is null.\n"); + pr_err("pci_adapter is null\n"); return -EFAULT; }
@@ -2699,7 +2699,7 @@ static int hinic_probe(struct pci_dev *pdev, const struct pci_device_id *id) create_singlethread_workqueue(HINIC_SLAVE_NIC_DELAY); if (!pci_adapter->slave_nic_init_workq) { sdk_err(&pdev->dev, - "Failed to create work queue:%s\n", + "Failed to create work queue: %s\n", HINIC_SLAVE_NIC_DELAY); goto ceate_nic_delay_work_fail; } diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c index 1679c24eba9d..56af81d132fd 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_main.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c @@ -407,7 +407,7 @@ static int hinic_setup_num_qps(struct hinic_nic_dev *nic_dev) } nic_dev->qps_irq_info = kzalloc(irq_size, GFP_KERNEL); if (!nic_dev->qps_irq_info) { - nicif_err(nic_dev, drv, netdev, "Failed to alloc msix entries\n"); + nicif_err(nic_dev, drv, netdev, "Failed to alloc qps_irq_info\n"); return -ENOMEM; }
@@ -560,7 +560,7 @@ static int hinic_request_irq(struct hinic_irq *irq_cfg, u16 q_id) err = hinic_set_interrupt_cfg(nic_dev->hwdev, info); if (err) { nicif_err(nic_dev, drv, irq_cfg->netdev, - "Failed to set RX interrupt coalescing attribute.\n"); + "Failed to set RX interrupt coalescing attribute\n"); qp_del_napi(irq_cfg); return err; } @@ -2977,7 +2977,7 @@ int hinic_enable_func_rss(struct hinic_nic_dev *nic_dev) if (err) { if (err == -ENOSPC) nicif_warn(nic_dev, drv, netdev, - "Failed to alloc RSS template,table is full\n"); + "Failed to alloc RSS template, table is full\n"); else nicif_err(nic_dev, drv, netdev, "Failed to alloc RSS template\n"); diff --git a/drivers/net/ethernet/huawei/hinic/hinic_mbox.c b/drivers/net/ethernet/huawei/hinic/hinic_mbox.c index fc91bdffe1eb..29feb9b4a16c 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_mbox.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_mbox.c @@ -213,8 +213,8 @@ static bool check_func_id(struct hinic_hwdev *hwdev, u16 src_func_idx,
if (in_size < offset + sizeof(func_idx)) { sdk_warn(hwdev->dev_hdl, - "Reveice mailbox msg len: %d less than 10 Bytes is invalid\n", - in_size); + "Receive mailbox msg len: %d less than %ld Bytes is invalid\n", + in_size, offset + sizeof(func_idx)); return false; }
@@ -222,7 +222,7 @@ static bool check_func_id(struct hinic_hwdev *hwdev, u16 src_func_idx,
if (src_func_idx != func_idx) { sdk_warn(hwdev->dev_hdl, - "Reveice mailbox function id(0x%x) not equal to msg function id(0x%x)\n", + "Reveive mailbox function id(0x%x) not equal to msg function id(0x%x)\n", src_func_idx, func_idx); return false; } @@ -909,7 +909,8 @@ void hinic_mbox_func_aeqe_handler(void *handle, u8 *header, u8 size)
if (src >= HINIC_MAX_FUNCTIONS) { sdk_err(func_to_func->hwdev->dev_hdl, - "Mailbox source function id:%u is invalid\n", (u32)src); + "Mailbox source function id: %u is invalid\n", + (u32)src); return; }
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_mgmt.c b/drivers/net/ethernet/huawei/hinic/hinic_mgmt.c index 38abf8fe0817..3a8362cc7d01 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_mgmt.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_mgmt.c @@ -680,7 +680,7 @@ static int hinic_read_clp_data(struct hinic_hwdev *hwdev, err = hinic_read_clp_reg(hwdev, HINIC_CLP_RSP_HOST, HINIC_CLP_READY_RSP_HOST, &ready); if (err || delay_cnt > HINIC_CLP_DELAY_CNT_MAX) { - sdk_err(hwdev->dev_hdl, "timeout with delay_cnt:%d\n", + sdk_err(hwdev->dev_hdl, "Timeout with delay_cnt: %d\n", delay_cnt); return -EINVAL; } @@ -692,7 +692,7 @@ static int hinic_read_clp_data(struct hinic_hwdev *hwdev, return err;
if (temp_out_size > HINIC_CLP_SRAM_SIZE_REG_MAX || !temp_out_size) { - sdk_err(hwdev->dev_hdl, "invalid temp_out_size:%d\n", + sdk_err(hwdev->dev_hdl, "Invalid temp_out_size: %d\n", temp_out_size); return -EINVAL; } @@ -757,14 +757,16 @@ static int hinic_check_clp_init_status(struct hinic_hwdev *hwdev) err = hinic_read_clp_reg(hwdev, HINIC_CLP_REQ_HOST, HINIC_CLP_BA_HOST, ®_value); if (err || !reg_value) { - sdk_err(hwdev->dev_hdl, "Wrong req ba value:0x%x\n", reg_value); + sdk_err(hwdev->dev_hdl, "Wrong req ba value: 0x%x\n", + reg_value); return -EINVAL; }
err = hinic_read_clp_reg(hwdev, HINIC_CLP_RSP_HOST, HINIC_CLP_BA_HOST, ®_value); if (err || !reg_value) { - sdk_err(hwdev->dev_hdl, "Wrong rsp ba value:0x%x\n", reg_value); + sdk_err(hwdev->dev_hdl, "Wrong rsp ba value: 0x%x\n", + reg_value); return -EINVAL; }
@@ -822,7 +824,7 @@ int hinic_pf_clp_to_mgmt(void *hwdev, enum hinic_mod_type mod, u8 cmd,
if (real_size > (HINIC_CLP_INPUT_BUFFER_LEN_HOST / HINIC_CLP_DATA_UNIT_HOST)) { - sdk_err(dev->dev_hdl, "Invalid real_size:%d\n", real_size); + sdk_err(dev->dev_hdl, "Invalid real_size: %d\n", real_size); return -EINVAL; } down(&clp_pf_to_mgmt->clp_msg_lock); @@ -871,13 +873,13 @@ int hinic_pf_clp_to_mgmt(void *hwdev, enum hinic_mod_type mod, u8 cmd, real_size = (u16)((real_size * HINIC_CLP_DATA_UNIT_HOST) & 0xffff); if (real_size <= sizeof(header) || real_size > HINIC_CLP_INPUT_BUFFER_LEN_HOST) { - sdk_err(dev->dev_hdl, "Invalid response size:%d", real_size); + sdk_err(dev->dev_hdl, "Invalid response size: %d", real_size); up(&clp_pf_to_mgmt->clp_msg_lock); return -EINVAL; } real_size = real_size - sizeof(header); if (real_size != *out_size) { - sdk_err(dev->dev_hdl, "Invalid real_size:%d, out_size:%d\n", + sdk_err(dev->dev_hdl, "Invalid real_size: %d, out_size: %d\n", real_size, *out_size); up(&clp_pf_to_mgmt->clp_msg_lock); return -EINVAL; @@ -1090,11 +1092,11 @@ static void mgmt_resp_msg_handler(struct hinic_msg_pf_to_mgmt *pf_to_mgmt, pf_to_mgmt->event_flag == SEND_EVENT_START) { complete(&recv_msg->recv_done); } else if (recv_msg->msg_id != pf_to_mgmt->sync_msg_id) { - sdk_err(dev, "Send msg id(0x%x) recv msg id(0x%x) dismatch, event state=%d\n", + sdk_err(dev, "Send msg id(0x%x) recv msg id(0x%x) dismatch, event state: %d\n", pf_to_mgmt->sync_msg_id, recv_msg->msg_id, pf_to_mgmt->event_flag); } else { - sdk_err(dev, "Wait timeout, send msg id(0x%x) recv msg id(0x%x), event state=%d!\n", + sdk_err(dev, "Wait timeout, send msg id(0x%x) recv msg id(0x%x), event state: %d\n", pf_to_mgmt->sync_msg_id, recv_msg->msg_id, pf_to_mgmt->event_flag); } diff --git a/drivers/net/ethernet/huawei/hinic/hinic_nic_cfg.c b/drivers/net/ethernet/huawei/hinic/hinic_nic_cfg.c index 90b16ea9658d..1bac0ea08a52 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_nic_cfg.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_nic_cfg.c @@ -309,7 +309,7 @@ int hinic_del_mac(void *hwdev, const u8 *mac_addr, u16 vlan_id, u16 func_id) return -EINVAL; } if (mac_info.status == HINIC_PF_SET_VF_ALREADY) { - nic_warn(nic_hwdev->dev_hdl, "PF has already set VF mac, Ignore delete operation.\n"); + nic_warn(nic_hwdev->dev_hdl, "PF has already set VF mac, Ignore delete operation\n"); return HINIC_PF_SET_VF_ALREADY; }
@@ -461,12 +461,14 @@ int hinic_set_port_mtu(void *hwdev, u32 new_mtu)
if (new_mtu < HINIC_MIN_MTU_SIZE) { nic_err(nic_hwdev->dev_hdl, - "Invalid mtu size, mtu size < 256bytes"); + "Invalid mtu size, mtu size < %dbytes\n", + HINIC_MIN_MTU_SIZE); return -EINVAL; }
if (new_mtu > HINIC_MAX_JUMBO_FRAME_SIZE) { - nic_err(nic_hwdev->dev_hdl, "Invalid mtu size, mtu size > 9600bytes"); + nic_err(nic_hwdev->dev_hdl, "Invalid mtu size, mtu size > %dbytes\n", + HINIC_MAX_JUMBO_FRAME_SIZE); return -EINVAL; }
@@ -2220,7 +2222,7 @@ int hinic_get_mgmt_version(void *hwdev, u8 *mgmt_ver) err = snprintf(mgmt_ver, HINIC_MGMT_VERSION_MAX_LEN, "%s", up_ver.ver); if (err <= 0 || err >= HINIC_MGMT_VERSION_MAX_LEN) { nic_err(dev->dev_hdl, - "Failed snprintf fw version, function return(%d) and dest_len(%d)\n", + "Failed to snprintf fw version, function return(%d) and dest_len(%d)\n", err, HINIC_MGMT_VERSION_MAX_LEN); return -EINVAL; } @@ -2501,7 +2503,7 @@ static int hinic_del_vf_mac_msg_handler(struct hinic_nic_io *nic_io, u16 vf, if (vf_info->pf_set_mac && !(vf_info->trust) && is_valid_ether_addr(mac_in->mac) && !memcmp(vf_info->vf_mac_addr, mac_in->mac, ETH_ALEN)) { - nic_warn(nic_io->hwdev->dev_hdl, "PF has already set VF mac.\n"); + nic_warn(nic_io->hwdev->dev_hdl, "PF has already set VF mac\n"); mac_out->status = HINIC_PF_SET_VF_ALREADY; *out_size = sizeof(*mac_out); return 0; @@ -2530,12 +2532,12 @@ static int hinic_update_vf_mac_msg_handler(struct hinic_nic_io *nic_io, u16 vf, int err;
if (!is_valid_ether_addr(mac_in->new_mac)) { - nic_err(nic_io->hwdev->dev_hdl, "Update VF MAC is invalid.\n"); + nic_err(nic_io->hwdev->dev_hdl, "Update VF MAC is invalid\n"); return -EINVAL; }
if (vf_info->pf_set_mac && !(vf_info->trust)) { - nic_warn(nic_io->hwdev->dev_hdl, "PF has already set VF mac.\n"); + nic_warn(nic_io->hwdev->dev_hdl, "PF has already set VF mac\n"); mac_out->status = HINIC_PF_SET_VF_ALREADY; *out_size = sizeof(*mac_out); return 0; @@ -2724,7 +2726,7 @@ int nic_pf_mbox_handler(void *hwdev, u16 vf_id, u8 cmd, void *buf_in, if (!hinic_mbox_check_cmd_valid(hwdev, nic_cmd_support_vf, vf_id, cmd, buf_in, in_size, size)) { nic_err(((struct hinic_hwdev *)hwdev)->dev_hdl, - "PF Receive VF nic cmd(0x%x), mbox len(0x%x) is invalid\n", + "PF Receive VF nic cmd(0x%x) or mbox len(0x%x) is invalid\n", cmd, in_size); err = HINIC_MBOX_VF_CMD_ERROR; return err; @@ -2793,7 +2795,7 @@ int nic_pf_mbox_handler(void *hwdev, u16 vf_id, u8 cmd, void *buf_in,
if (err && err != HINIC_DEV_BUSY_ACTIVE_FW && err != HINIC_MBOX_PF_BUSY_ACTIVE_FW) - nic_err(nic_io->hwdev->dev_hdl, "PF receive VF L2NIC cmd: %d process error, err:%d\n", + nic_err(nic_io->hwdev->dev_hdl, "PF receive VF L2NIC cmd: %d process error, err: %d\n", cmd, err); return err; } @@ -3522,13 +3524,13 @@ int hinic_set_anti_attack(void *hwdev, bool enable) &rate, sizeof(rate), &rate, &out_size); if (err || !out_size || rate.status) { - nic_err(nic_hwdev->dev_hdl, "Can`t %s port Anti-Attack rate limit err: %d, status: 0x%x, out size: 0x%x\n", + nic_err(nic_hwdev->dev_hdl, "Can't %s port Anti-Attack rate limit err: %d, status: 0x%x, out size: 0x%x\n", (enable ? "enable" : "disable"), err, rate.status, out_size); return -EINVAL; }
- nic_info(nic_hwdev->dev_hdl, "%s port Anti-Attack rate limit succeed.\n", + nic_info(nic_hwdev->dev_hdl, "%s port Anti-Attack rate limit succeed\n", (enable ? "Enable" : "Disable"));
return 0; @@ -3616,13 +3618,13 @@ int hinic_set_super_cqe_state(void *hwdev, bool enable) &super_cqe, sizeof(super_cqe), &super_cqe, &out_size); if (err || !out_size || super_cqe.status) { - nic_err(nic_hwdev->dev_hdl, "Can`t %s surper cqe, err: %d, status: 0x%x, out size: 0x%x\n", + nic_err(nic_hwdev->dev_hdl, "Can't %s surper cqe, err: %d, status: 0x%x, out size: 0x%x\n", (enable ? "enable" : "disable"), err, super_cqe.status, out_size); return -EINVAL; }
- nic_info(nic_hwdev->dev_hdl, "%s super cqe succeed.\n", + nic_info(nic_hwdev->dev_hdl, "%s super cqe succeed\n", (enable ? "Enable" : "Disable"));
return 0; @@ -3960,16 +3962,16 @@ int hinic_disable_tx_promisc(void *hwdev)
info.cfg = HINIC_TX_PROMISC_DISABLE; err = hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_L2NIC, - HINIC_PORT_CMD_DISABLE_PROMISIC, &info, + HINIC_PORT_CMD_DISABLE_PROMISC, &info, sizeof(info), &info, &out_size, 0); if (err || !out_size || info.status) { if (info.status == HINIC_MGMT_CMD_UNSUPPORTED) { nic_info(((struct hinic_hwdev *)hwdev)->dev_hdl, - "Unsupported to disable TX promisic\n"); + "Unsupported to disable TX promisc\n"); return 0; } nic_err(((struct hinic_hwdev *)hwdev)->dev_hdl, - "Failed to disable multihost promisic, err: %d, status: 0x%x, out size: 0x%x\n", + "Failed to disable multihost promisc, err: %d, status: 0x%x, out size: 0x%x\n", err, info.status, out_size); return -EFAULT; } diff --git a/drivers/net/ethernet/huawei/hinic/hinic_nic_dbg.c b/drivers/net/ethernet/huawei/hinic/hinic_nic_dbg.c index e49a21fa952e..9bcdcd3ce1c0 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_nic_dbg.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_nic_dbg.c @@ -101,7 +101,7 @@ u16 hinic_dbg_get_rq_hw_pi(void *hwdev, u16 q_id) if (qp) return cpu_to_be16(*qp->rq.pi_virt_addr);
- nic_err(((struct hinic_hwdev *)hwdev)->dev_hdl, "Get rq hw pi failed!\n"); + nic_err(((struct hinic_hwdev *)hwdev)->dev_hdl, "Get rq hw pi failed\n");
return INVALID_PI; } @@ -184,7 +184,7 @@ static int get_wqe_info(struct hinic_wq *wq, u16 idx, u16 wqebb_cnt, return -EFAULT;
if (*wqe_size != (u16)(wq->wqebb_size * wqebb_cnt)) { - pr_err("Unexpect out buf size from user :%d, expect: %d\n", + pr_err("Unexpect out buf size from user: %d, expect: %d\n", *wqe_size, (u16)(wq->wqebb_size * wqebb_cnt)); return -EFAULT; } @@ -231,7 +231,7 @@ int hinic_dbg_get_rq_wqe_info(void *hwdev, u16 q_id, u16 idx, u16 wqebb_cnt, int hinic_dbg_get_hw_stats(const void *hwdev, u8 *hw_stats, u16 *out_size) { if (!hw_stats || *out_size != sizeof(struct hinic_hw_stats)) { - pr_err("Unexpect out buf size from user :%d, expect: %lu\n", + pr_err("Unexpect out buf size from user: %d, expect: %lu\n", *out_size, sizeof(struct hinic_hw_stats)); return -EFAULT; } diff --git a/drivers/net/ethernet/huawei/hinic/hinic_nic_io.c b/drivers/net/ethernet/huawei/hinic/hinic_nic_io.c index f2fb0bc54570..b935c41a4435 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_nic_io.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_nic_io.c @@ -253,7 +253,7 @@ int hinic_create_qps(void *dev, u16 num_qp, u16 sq_depth, u16 rq_depth,
max_qps = hinic_func_max_qnum(hwdev); if (num_qp > max_qps) { - nic_err(hwdev->dev_hdl, "Create number of qps: %d > max number of qps:%d\n", + nic_err(hwdev->dev_hdl, "Create number of qps: %d > max number of qps: %d\n", num_qp, max_qps); return -EINVAL; } diff --git a/drivers/net/ethernet/huawei/hinic/hinic_nictool.c b/drivers/net/ethernet/huawei/hinic/hinic_nictool.c index 3fcb855bd605..8ef008af05e8 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_nictool.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_nictool.c @@ -336,7 +336,7 @@ static int get_inter_num(struct hinic_nic_dev *nic_dev, void *buf_in,
if (*out_size != sizeof(u16)) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Unexpect out buf size from user :%d, expect: %lu\n", + "Unexpect out buf size from user: %d, expect: %lu\n", *out_size, sizeof(u16)); return -EFAULT; } @@ -381,7 +381,7 @@ static int get_num_cos(struct hinic_nic_dev *nic_dev, void *buf_in,
if (*out_size != sizeof(*num_cos)) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Unexpect out buf size from user :%d, expect: %lu\n", + "Unexpect out buf size from user: %d, expect: %lu\n", *out_size, sizeof(*num_cos)); return -EFAULT; } @@ -399,7 +399,7 @@ static int get_dcb_cos_up_map(struct hinic_nic_dev *nic_dev, void *buf_in,
if (*out_size != sizeof(*map)) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Unexpect out buf size from user :%d, expect: %lu\n", + "Unexpect out buf size from user: %d, expect: %lu\n", *out_size, sizeof(*map)); return -EFAULT; } @@ -438,7 +438,7 @@ static int get_rx_cqe_info(struct hinic_nic_dev *nic_dev, void *buf_in,
if (*out_size != sizeof(struct hinic_rq_cqe)) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Unexpect out buf size from user :%d, expect: %lu\n", + "Unexpect out buf size from user: %d, expect: %lu\n", *out_size, sizeof(struct hinic_rq_cqe)); return -EFAULT; } @@ -477,7 +477,7 @@ static int hinic_dbg_get_sq_info(struct hinic_nic_dev *nic_dev, u16 q_id,
if (*msg_size != sizeof(*sq_info)) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Unexpect out buf size from user :%d, expect: %lu\n", + "Unexpect out buf size from user: %d, expect: %lu\n", *msg_size, sizeof(*sq_info)); return -EFAULT; } @@ -576,7 +576,7 @@ static int get_loopback_mode(struct hinic_nic_dev *nic_dev, void *buf_in,
if (*out_size != sizeof(*mode)) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Unexpect out buf size from user :%d, expect: %lu\n", + "Unexpect out buf size from user: %d, expect: %lu\n", *out_size, sizeof(*mode)); return -EFAULT; } @@ -717,7 +717,7 @@ int set_pfc_control(struct hinic_nic_dev *nic_dev, void *buf_in, pfc_en = *((u8 *)buf_in); if (!(test_bit(HINIC_DCB_ENABLE, &nic_dev->flags))) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Need to enable dcb first.\n"); + "Need to enable dcb first\n"); err = 0xff; goto exit; } @@ -752,7 +752,7 @@ int set_ets(struct hinic_nic_dev *nic_dev, void *buf_in,
if (!(test_bit(HINIC_DCB_ENABLE, &nic_dev->flags))) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Need to enable dcb first.\n"); + "Need to enable dcb first\n"); err = 0xff; goto exit; } @@ -765,7 +765,7 @@ int set_ets(struct hinic_nic_dev *nic_dev, void *buf_in,
if (!(test_bit(HINIC_ETS_ENABLE, &nic_dev->flags))) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Need to enable ets first.\n"); + "Need to enable ets first\n"); err = 0xff; goto exit; } @@ -792,7 +792,7 @@ int set_ets(struct hinic_nic_dev *nic_dev, void *buf_in, err = hinic_dcbnl_set_ets_tool(nic_dev->netdev); if (err) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Failed to set ets [%d].\n", err); + "Failed to set ets [%d]\n", err); } exit: *((u8 *)buf_out) = err; @@ -838,7 +838,7 @@ int get_support_tc(struct hinic_nic_dev *nic_dev, void *buf_in,
if (*out_size != sizeof(*tc_num)) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Unexpect out buf size from user :%d, expect: %lu\n", + "Unexpect out buf size from user: %d, expect: %lu\n", *out_size, sizeof(*tc_num)); return -EFAULT; } @@ -881,7 +881,7 @@ int set_pfc_priority(struct hinic_nic_dev *nic_dev, void *buf_in, if (!((test_bit(HINIC_DCB_ENABLE, &nic_dev->flags)) && nic_dev->tmp_dcb_cfg.pfc_state)) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Need to enable pfc first.\n"); + "Need to enable pfc first\n"); err = 0xff; goto exit; } @@ -983,7 +983,7 @@ static int set_poll_weight(struct hinic_nic_dev *nic_dev, void *buf_in,
if (!buf_in || in_size != sizeof(*weight_info)) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Unexpect in buf size from user :%u, expect: %lu\n", + "Unexpect in buf size from user: %u, expect: %lu\n", *out_size, sizeof(*weight_info)); return -EFAULT; } @@ -999,7 +999,7 @@ static int get_homologue(struct hinic_nic_dev *nic_dev, void *buf_in, struct hinic_homologues *homo = buf_out; if (!buf_out || *out_size != sizeof(*homo)) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Unexpect out buf size from user :%d, expect: %lu\n", + "Unexpect out buf size from user: %d, expect: %lu\n", *out_size, sizeof(*homo)); return -EFAULT; } @@ -1020,7 +1020,7 @@ static int set_homologue(struct hinic_nic_dev *nic_dev, void *buf_in, struct hinic_homologues *homo = buf_in; if (!buf_in || in_size != sizeof(*homo)) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Unexpect in buf size from user :%d, expect: %lu\n", + "Unexpect in buf size from user: %d, expect: %lu\n", *out_size, sizeof(*homo)); return -EFAULT; } @@ -1030,7 +1030,7 @@ static int set_homologue(struct hinic_nic_dev *nic_dev, void *buf_in, } else if (homo->homo_state == HINIC_HOMOLOGUES_OFF) { clear_bit(HINIC_SAME_RXTX, &nic_dev->flags); } else { - pr_err("Invalid parameters.\n"); + pr_err("Invalid parameters\n"); return -EFAULT; }
@@ -1047,7 +1047,7 @@ static int get_sset_count(struct hinic_nic_dev *nic_dev, void *buf_in, if (!buf_in || !buf_out || in_size != sizeof(u32) || *out_size != sizeof(u32)) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Invalid parameters.\n"); + "Invalid parameters\n"); return -EINVAL; }
@@ -1083,7 +1083,7 @@ static int get_sset_stats(struct hinic_nic_dev *nic_dev, void *buf_in,
if (count * sizeof(*items) != *out_size) { nicif_err(nic_dev, drv, nic_dev->netdev, - "Unexpect out buf size from user :%d, expect: %lu\n", + "Unexpect out buf size from user: %d, expect: %lu\n", *out_size, count * sizeof(*items)); return -EINVAL; } @@ -1112,7 +1112,7 @@ static int get_func_type(void *hwdev, void *buf_in, u32 in_size,
func_typ = hinic_func_type(hwdev); if (!buf_out || *out_size != sizeof(u16)) { - pr_err("Unexpect out buf size from user :%d, expect: %lu\n", + pr_err("Unexpect out buf size from user: %d, expect: %lu\n", *out_size, sizeof(u16)); return -EFAULT; } @@ -1126,7 +1126,7 @@ static int get_func_id(void *hwdev, void *buf_in, u32 in_size, u16 func_id;
if (!buf_out || *out_size != sizeof(u16)) { - pr_err("Unexpect out buf size from user :%d, expect: %lu\n", + pr_err("Unexpect out buf size from user: %d, expect: %lu\n", *out_size, sizeof(u16)); return -EFAULT; } @@ -1145,7 +1145,7 @@ static int get_chip_faults_stats(void *hwdev, void *buf_in, u32 in_size,
if (!buf_in || !buf_out || *out_size != sizeof(*fault_info) || in_size != sizeof(*fault_info)) { - pr_err("Unexpect out buf size from user :%d, expect: %lu\n", + pr_err("Unexpect out buf size from user: %d, expect: %lu\n", *out_size, sizeof(*fault_info)); return -EFAULT; } @@ -1178,7 +1178,7 @@ static int get_drv_version(void *hwdev, void *buf_in, u32 in_size, int err;
if (*out_size != sizeof(*ver_info)) { - pr_err("Unexpect out buf size from user :%d, expect: %lu\n", + pr_err("Unexpect out buf size from user: %d, expect: %lu\n", *out_size, sizeof(*ver_info)); return -EFAULT; } @@ -1212,7 +1212,7 @@ static int get_single_card_info(void *hwdev, void *buf_in, u32 in_size, { if (!buf_in || !buf_out || in_size != sizeof(struct card_info) || *out_size != sizeof(struct card_info)) { - pr_err("Unexpect out buf size from user :%d, expect: %lu\n", + pr_err("Unexpect out buf size from user: %d, expect: %lu\n", *out_size, sizeof(struct card_info)); return -EFAULT; } @@ -1230,7 +1230,7 @@ static int get_device_id(void *hwdev, void *buf_in, u32 in_size, int err; if (!buf_out || !buf_in || *out_size != sizeof(u16) || in_size != sizeof(u16)) { - pr_err("Unexpect out buf size from user :%d, expect: %lu\n", + pr_err("Unexpect out buf size from user: %d, expect: %lu\n", *out_size, sizeof(u16)); return -EFAULT; } @@ -1297,7 +1297,7 @@ static int __get_card_usr_api_chain_mem(int card_idx) (void *)__get_free_pages(GFP_KERNEL, DBGTOOL_PAGE_ORDER); if (!g_card_vir_addr[card_idx]) { - pr_err("Alloc api chain memory fail for card %d.\n", + pr_err("Alloc api chain memory fail for card %d\n", card_idx); mutex_unlock(&g_addr_lock); return -EFAULT; @@ -1309,7 +1309,7 @@ static int __get_card_usr_api_chain_mem(int card_idx) g_card_phy_addr[card_idx] = virt_to_phys(g_card_vir_addr[card_idx]); if (!g_card_phy_addr[card_idx]) { - pr_err("phy addr for card %d is 0.\n", card_idx); + pr_err("phy addr for card %d is 0\n", card_idx); free_pages((unsigned long)g_card_vir_addr[card_idx], DBGTOOL_PAGE_ORDER); g_card_vir_addr[card_idx] = NULL; @@ -1589,7 +1589,7 @@ static int send_to_ucode(void *hwdev, struct msg_module *nt_msg, nt_msg->ucode_cmd.ucode_db.ucode_cmd_type, buf_in, buf_out, 0); if (ret) - pr_err("Send direct cmdq err: %d!\n", ret); + pr_err("Send direct cmdq err: %d\n", ret); } else { ret = hinic_cmdq_detail_resp (hwdev, nt_msg->ucode_cmd.ucode_db.cmdq_ack_type, @@ -1597,7 +1597,7 @@ static int send_to_ucode(void *hwdev, struct msg_module *nt_msg, nt_msg->ucode_cmd.ucode_db.ucode_cmd_type, buf_in, buf_out, 0); if (ret) - pr_err("Send detail cmdq err: %d!\n", ret); + pr_err("Send detail cmdq err: %d\n", ret); }
return ret; @@ -1732,7 +1732,7 @@ static int check_useparam_valid(struct msg_module *nt_msg, void *buf_in) u32 rd_len = csr_write_msg->rd_len;
if (rd_len > TOOL_COUNTER_MAX_LEN) { - pr_err("Csr read or write len is invalid!\n"); + pr_err("Csr read or write len is invalid\n"); return -EINVAL; }
@@ -1810,7 +1810,7 @@ static int sm_rd32(void *hwdev, u32 id, u8 instance,
ret = hinic_sm_ctr_rd32(hwdev, node, instance, id, &val1); if (ret) { - pr_err("Get sm ctr information (32 bits)failed!\n"); + pr_err("Get sm ctr information (32 bits)failed\n"); val1 = 0xffffffff; }
@@ -1827,7 +1827,7 @@ static int sm_rd64_pair(void *hwdev, u32 id, u8 instance,
ret = hinic_sm_ctr_rd64_pair(hwdev, node, instance, id, &val1, &val2); if (ret) { - pr_err("Get sm ctr information (64 bits pair)failed!\n"); + pr_err("Get sm ctr information (64 bits pair)failed\n"); val1 = 0xffffffff; }
@@ -1845,7 +1845,7 @@ static int sm_rd64(void *hwdev, u32 id, u8 instance,
ret = hinic_sm_ctr_rd64(hwdev, node, instance, id, &val1); if (ret) { - pr_err("Get sm ctr information (64 bits)failed!\n"); + pr_err("Get sm ctr information (64 bits)failed\n"); val1 = 0xffffffff; } buf_out->val1 = val1; @@ -1890,7 +1890,7 @@ static int send_to_sm(void *hwdev, struct msg_module *nt_msg, }
if (ret) - pr_err("Get sm information fail!\n"); + pr_err("Get sm information fail\n");
*out_size = sizeof(struct sm_out_st);
@@ -2024,7 +2024,7 @@ static int get_self_test_cmd(struct msg_module *nt_msg)
ret = hinic_get_self_test_result(nt_msg->device_name, &res); if (ret) { - pr_err("Get self test result failed!\n"); + pr_err("Get self test result failed\n"); return -EFAULT; }
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_port_cmd.h b/drivers/net/ethernet/huawei/hinic/hinic_port_cmd.h index 0b13ba9d2f26..1d3c0301ba63 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_port_cmd.h +++ b/drivers/net/ethernet/huawei/hinic/hinic_port_cmd.h @@ -93,7 +93,7 @@ enum hinic_port_cmd { HINIC_PORT_CMD_SET_JUMBO_FRAME_SIZE,
/* 0x4c ~ 0x57 have defined in base line */ - HINIC_PORT_CMD_DISABLE_PROMISIC = 0x4c, + HINIC_PORT_CMD_DISABLE_PROMISC = 0x4c, HINIC_PORT_CMD_ENABLE_SPOOFCHK = 0x4e, HINIC_PORT_CMD_GET_MGMT_VERSION = 0x58, HINIC_PORT_CMD_GET_BOOT_VERSION, diff --git a/drivers/net/ethernet/huawei/hinic/hinic_sriov.c b/drivers/net/ethernet/huawei/hinic/hinic_sriov.c index 047023267ead..1a436c133785 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_sriov.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_sriov.c @@ -39,7 +39,7 @@ int hinic_pci_sriov_disable(struct pci_dev *dev)
if (test_and_set_bit(HINIC_SRIOV_DISABLE, &sriov_info->state)) { nic_err(&sriov_info->pdev->dev, - "SR-IOV disable in process, please wait"); + "SR-IOV disable in process, please wait\n"); return -EPERM; }
@@ -190,7 +190,7 @@ int hinic_ndo_set_vf_mac(struct net_device *netdev, int vf, u8 *mac) return err;
nic_info(&sriov_info->pdev->dev, "Setting MAC %pM on VF %d\n", mac, vf); - nic_info(&sriov_info->pdev->dev, "Reload the VF driver to make this change effective."); + nic_info(&sriov_info->pdev->dev, "Reload the VF driver to make this change effective\n");
return 0; } diff --git a/drivers/net/ethernet/huawei/hinic/hinic_tx.c b/drivers/net/ethernet/huawei/hinic/hinic_tx.c index b556132a72af..8d921ad104e8 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_tx.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_tx.c @@ -949,7 +949,7 @@ int hinic_setup_all_tx_resources(struct net_device *netdev) txq = &nic_dev->txqs[q_id]; tx_info_sz = txq->q_depth * sizeof(*txq->tx_info); if (!tx_info_sz) { - nicif_err(nic_dev, drv, netdev, "Cannot allocate zero size tx%d info\n", + nicif_err(nic_dev, drv, netdev, "Cannot allocate zero size txq%d info\n", q_id); err = -EINVAL; goto init_txq_err; @@ -965,7 +965,7 @@ int hinic_setup_all_tx_resources(struct net_device *netdev)
err = hinic_setup_tx_wqe(txq); if (err != txq->q_depth) { - nicif_err(nic_dev, drv, netdev, "Failed to setup Tx:%d wqe\n", + nicif_err(nic_dev, drv, netdev, "Failed to setup Tx: %d wqe\n", q_id); q_id++; goto init_txq_err; diff --git a/drivers/net/ethernet/huawei/hinic/hinic_wq.c b/drivers/net/ethernet/huawei/hinic/hinic_wq.c index 032b28332a65..fcf98413d2de 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_wq.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_wq.c @@ -55,7 +55,7 @@ static int queue_alloc_page(void *handle, u64 **vaddr, u64 *paddr, }
if (!ADDR_4K_ALIGNED(dma_addr)) { - sdk_err(handle, "Cla is not 4k aligned!\n"); + sdk_err(handle, "Cla is not 4k aligned\n"); goto shadow_vaddr_err; }