提交 8ec98ba7 编写于 作者: D Daode Huang 提交者: David S. Miller

net: hns: change code style from a = a + x to a += x

This patch fixes the code style in hns driver. Change it from
"buff = buff + xxx" to "buff += xxx". The reveiw comments is
from andy.
Reviewed-by: NAndriy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NDaode Huang <huangdaode@hisilicon.com>
Signed-off-by: NYisen Zhuang <Yisen.Zhuang@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d9fdb4ed
......@@ -2540,45 +2540,45 @@ static char *hns_dsaf_get_node_stats_strings(char *data, int node,
bool is_ver1 = AE_IS_VER1(dsaf_dev->dsaf_ver);
snprintf(buff, ETH_GSTRING_LEN, "innod%d_pad_drop_pkts", node);
buff = buff + ETH_GSTRING_LEN;
buff += ETH_GSTRING_LEN;
snprintf(buff, ETH_GSTRING_LEN, "innod%d_manage_pkts", node);
buff = buff + ETH_GSTRING_LEN;
buff += ETH_GSTRING_LEN;
snprintf(buff, ETH_GSTRING_LEN, "innod%d_rx_pkts", node);
buff = buff + ETH_GSTRING_LEN;
buff += ETH_GSTRING_LEN;
snprintf(buff, ETH_GSTRING_LEN, "innod%d_rx_pkt_id", node);
buff = buff + ETH_GSTRING_LEN;
buff += ETH_GSTRING_LEN;
snprintf(buff, ETH_GSTRING_LEN, "innod%d_rx_pause_frame", node);
buff = buff + ETH_GSTRING_LEN;
buff += ETH_GSTRING_LEN;
snprintf(buff, ETH_GSTRING_LEN, "innod%d_release_buf_num", node);
buff = buff + ETH_GSTRING_LEN;
buff += ETH_GSTRING_LEN;
snprintf(buff, ETH_GSTRING_LEN, "innod%d_sbm_drop_pkts", node);
buff = buff + ETH_GSTRING_LEN;
buff += ETH_GSTRING_LEN;
snprintf(buff, ETH_GSTRING_LEN, "innod%d_crc_false_pkts", node);
buff = buff + ETH_GSTRING_LEN;
buff += ETH_GSTRING_LEN;
snprintf(buff, ETH_GSTRING_LEN, "innod%d_bp_drop_pkts", node);
buff = buff + ETH_GSTRING_LEN;
buff += ETH_GSTRING_LEN;
snprintf(buff, ETH_GSTRING_LEN, "innod%d_lookup_rslt_drop_pkts", node);
buff = buff + ETH_GSTRING_LEN;
buff += ETH_GSTRING_LEN;
snprintf(buff, ETH_GSTRING_LEN, "innod%d_local_rslt_fail_pkts", node);
buff = buff + ETH_GSTRING_LEN;
buff += ETH_GSTRING_LEN;
snprintf(buff, ETH_GSTRING_LEN, "innod%d_vlan_drop_pkts", node);
buff = buff + ETH_GSTRING_LEN;
buff += ETH_GSTRING_LEN;
snprintf(buff, ETH_GSTRING_LEN, "innod%d_stp_drop_pkts", node);
buff = buff + ETH_GSTRING_LEN;
buff += ETH_GSTRING_LEN;
if ((node < DSAF_SERVICE_NW_NUM) && (!is_ver1)) {
for (i = 0; i < DSAF_PRIO_NR; i++) {
snprintf(buff, ETH_GSTRING_LEN,
"inod%d_pfc_prio%d_pkts", node, i);
buff = buff + ETH_GSTRING_LEN;
buff += ETH_GSTRING_LEN;
}
for (i = 0; i < DSAF_PRIO_NR; i++) {
snprintf(buff, ETH_GSTRING_LEN,
"onod%d_pfc_prio%d_pkts", node, i);
buff = buff + ETH_GSTRING_LEN;
buff += ETH_GSTRING_LEN;
}
}
snprintf(buff, ETH_GSTRING_LEN, "onnod%d_tx_pkts", node);
buff = buff + ETH_GSTRING_LEN;
buff += ETH_GSTRING_LEN;
return buff;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册