Commit 0b4bdc55 authored by Huazhong Tan's avatar Huazhong Tan Committed by David S. Miller

net: hns3: clean up some coding style issue

This patch removes some unnecessary blank lines, redundant
parentheses, and changes one tab to blank in
hclge_dbg_dump_reg_common().
Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 84944d5c
...@@ -143,7 +143,7 @@ static void hclge_dbg_dump_reg_common(struct hclge_dev *hdev, ...@@ -143,7 +143,7 @@ static void hclge_dbg_dump_reg_common(struct hclge_dev *hdev,
return; return;
} }
buf_len = sizeof(struct hclge_desc) * bd_num; buf_len = sizeof(struct hclge_desc) * bd_num;
desc_src = kzalloc(buf_len, GFP_KERNEL); desc_src = kzalloc(buf_len, GFP_KERNEL);
if (!desc_src) if (!desc_src)
return; return;
......
...@@ -5380,7 +5380,7 @@ static int hclge_fd_check_ext_tuple(struct hclge_dev *hdev, ...@@ -5380,7 +5380,7 @@ static int hclge_fd_check_ext_tuple(struct hclge_dev *hdev,
struct ethtool_rx_flow_spec *fs, struct ethtool_rx_flow_spec *fs,
u32 *unused_tuple) u32 *unused_tuple)
{ {
if ((fs->flow_type & FLOW_EXT)) { if (fs->flow_type & FLOW_EXT) {
if (fs->h_ext.vlan_etype) if (fs->h_ext.vlan_etype)
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (!fs->h_ext.vlan_tci) if (!fs->h_ext.vlan_tci)
...@@ -5401,7 +5401,7 @@ static int hclge_fd_check_ext_tuple(struct hclge_dev *hdev, ...@@ -5401,7 +5401,7 @@ static int hclge_fd_check_ext_tuple(struct hclge_dev *hdev,
if (is_zero_ether_addr(fs->h_ext.h_dest)) if (is_zero_ether_addr(fs->h_ext.h_dest))
*unused_tuple |= BIT(INNER_DST_MAC); *unused_tuple |= BIT(INNER_DST_MAC);
else else
*unused_tuple &= ~(BIT(INNER_DST_MAC)); *unused_tuple &= ~BIT(INNER_DST_MAC);
} }
return 0; return 0;
...@@ -5674,7 +5674,7 @@ static int hclge_fd_get_tuple(struct hclge_dev *hdev, ...@@ -5674,7 +5674,7 @@ static int hclge_fd_get_tuple(struct hclge_dev *hdev,
break; break;
} }
if ((fs->flow_type & FLOW_EXT)) { if (fs->flow_type & FLOW_EXT) {
rule->tuples.vlan_tag1 = be16_to_cpu(fs->h_ext.vlan_tci); rule->tuples.vlan_tag1 = be16_to_cpu(fs->h_ext.vlan_tci);
rule->tuples_mask.vlan_tag1 = be16_to_cpu(fs->m_ext.vlan_tci); rule->tuples_mask.vlan_tag1 = be16_to_cpu(fs->m_ext.vlan_tci);
} }
...@@ -5785,7 +5785,6 @@ static int hclge_add_fd_entry(struct hnae3_handle *handle, ...@@ -5785,7 +5785,6 @@ static int hclge_add_fd_entry(struct hnae3_handle *handle,
} }
rule->flow_type = fs->flow_type; rule->flow_type = fs->flow_type;
rule->location = fs->location; rule->location = fs->location;
rule->unused_tuple = unused; rule->unused_tuple = unused;
rule->vf_id = dst_vport_id; rule->vf_id = dst_vport_id;
...@@ -6273,7 +6272,6 @@ static int hclge_add_fd_entry_by_arfs(struct hnae3_handle *handle, u16 queue_id, ...@@ -6273,7 +6272,6 @@ static int hclge_add_fd_entry_by_arfs(struct hnae3_handle *handle, u16 queue_id,
*/ */
if (hdev->fd_active_type == HCLGE_FD_EP_ACTIVE) { if (hdev->fd_active_type == HCLGE_FD_EP_ACTIVE) {
spin_unlock_bh(&hdev->fd_rule_lock); spin_unlock_bh(&hdev->fd_rule_lock);
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
...@@ -6287,14 +6285,12 @@ static int hclge_add_fd_entry_by_arfs(struct hnae3_handle *handle, u16 queue_id, ...@@ -6287,14 +6285,12 @@ static int hclge_add_fd_entry_by_arfs(struct hnae3_handle *handle, u16 queue_id,
bit_id = find_first_zero_bit(hdev->fd_bmap, MAX_FD_FILTER_NUM); bit_id = find_first_zero_bit(hdev->fd_bmap, MAX_FD_FILTER_NUM);
if (bit_id >= hdev->fd_cfg.rule_num[HCLGE_FD_STAGE_1]) { if (bit_id >= hdev->fd_cfg.rule_num[HCLGE_FD_STAGE_1]) {
spin_unlock_bh(&hdev->fd_rule_lock); spin_unlock_bh(&hdev->fd_rule_lock);
return -ENOSPC; return -ENOSPC;
} }
rule = kzalloc(sizeof(*rule), GFP_ATOMIC); rule = kzalloc(sizeof(*rule), GFP_ATOMIC);
if (!rule) { if (!rule) {
spin_unlock_bh(&hdev->fd_rule_lock); spin_unlock_bh(&hdev->fd_rule_lock);
return -ENOMEM; return -ENOMEM;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment