diff options
6 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.c b/drivers/net/ethernet/hisilicon/hns3/hnae3.c index 908d4f45c06a..6bbba15bcfd8 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.c +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.c | |||
@@ -104,7 +104,6 @@ int hnae3_register_client(struct hnae3_client *client) | |||
104 | { | 104 | { |
105 | struct hnae3_client *client_tmp; | 105 | struct hnae3_client *client_tmp; |
106 | struct hnae3_ae_dev *ae_dev; | 106 | struct hnae3_ae_dev *ae_dev; |
107 | int ret = 0; | ||
108 | 107 | ||
109 | if (!client) | 108 | if (!client) |
110 | return -ENODEV; | 109 | return -ENODEV; |
@@ -123,7 +122,7 @@ int hnae3_register_client(struct hnae3_client *client) | |||
123 | /* if the client could not be initialized on current port, for | 122 | /* if the client could not be initialized on current port, for |
124 | * any error reasons, move on to next available port | 123 | * any error reasons, move on to next available port |
125 | */ | 124 | */ |
126 | ret = hnae3_init_client_instance(client, ae_dev); | 125 | int ret = hnae3_init_client_instance(client, ae_dev); |
127 | if (ret) | 126 | if (ret) |
128 | dev_err(&ae_dev->pdev->dev, | 127 | dev_err(&ae_dev->pdev->dev, |
129 | "match and instantiation failed for port, ret = %d\n", | 128 | "match and instantiation failed for port, ret = %d\n", |
@@ -164,7 +163,7 @@ void hnae3_register_ae_algo(struct hnae3_ae_algo *ae_algo) | |||
164 | const struct pci_device_id *id; | 163 | const struct pci_device_id *id; |
165 | struct hnae3_ae_dev *ae_dev; | 164 | struct hnae3_ae_dev *ae_dev; |
166 | struct hnae3_client *client; | 165 | struct hnae3_client *client; |
167 | int ret = 0; | 166 | int ret; |
168 | 167 | ||
169 | if (!ae_algo) | 168 | if (!ae_algo) |
170 | return; | 169 | return; |
@@ -258,7 +257,7 @@ int hnae3_register_ae_dev(struct hnae3_ae_dev *ae_dev) | |||
258 | const struct pci_device_id *id; | 257 | const struct pci_device_id *id; |
259 | struct hnae3_ae_algo *ae_algo; | 258 | struct hnae3_ae_algo *ae_algo; |
260 | struct hnae3_client *client; | 259 | struct hnae3_client *client; |
261 | int ret = 0; | 260 | int ret; |
262 | 261 | ||
263 | if (!ae_dev) | 262 | if (!ae_dev) |
264 | return -ENODEV; | 263 | return -ENODEV; |
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c index 677bfe069fb7..42606538bb01 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | |||
@@ -749,7 +749,7 @@ static int hns3_set_link_ksettings(struct net_device *netdev, | |||
749 | { | 749 | { |
750 | struct hnae3_handle *handle = hns3_get_handle(netdev); | 750 | struct hnae3_handle *handle = hns3_get_handle(netdev); |
751 | const struct hnae3_ae_ops *ops = handle->ae_algo->ops; | 751 | const struct hnae3_ae_ops *ops = handle->ae_algo->ops; |
752 | int ret = 0; | 752 | int ret; |
753 | 753 | ||
754 | /* Chip don't support this mode. */ | 754 | /* Chip don't support this mode. */ |
755 | if (cmd->base.speed == SPEED_1000 && cmd->base.duplex == DUPLEX_HALF) | 755 | if (cmd->base.speed == SPEED_1000 && cmd->base.duplex == DUPLEX_HALF) |
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c index 05a4cdbf903a..5ce9a8ac627d 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | |||
@@ -1557,8 +1557,8 @@ int hclge_config_rocee_ras_interrupt(struct hclge_dev *hdev, bool en) | |||
1557 | 1557 | ||
1558 | static void hclge_handle_rocee_ras_error(struct hnae3_ae_dev *ae_dev) | 1558 | static void hclge_handle_rocee_ras_error(struct hnae3_ae_dev *ae_dev) |
1559 | { | 1559 | { |
1560 | enum hnae3_reset_type reset_type = HNAE3_NONE_RESET; | ||
1561 | struct hclge_dev *hdev = ae_dev->priv; | 1560 | struct hclge_dev *hdev = ae_dev->priv; |
1561 | enum hnae3_reset_type reset_type; | ||
1562 | 1562 | ||
1563 | if (test_bit(HCLGE_STATE_RST_HANDLING, &hdev->state) || | 1563 | if (test_bit(HCLGE_STATE_RST_HANDLING, &hdev->state) || |
1564 | hdev->pdev->revision < 0x21) | 1564 | hdev->pdev->revision < 0x21) |
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c index f30d1126d378..e829101d576c 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | |||
@@ -404,8 +404,8 @@ static int hclge_tm_port_shaper_cfg(struct hclge_dev *hdev) | |||
404 | { | 404 | { |
405 | struct hclge_port_shapping_cmd *shap_cfg_cmd; | 405 | struct hclge_port_shapping_cmd *shap_cfg_cmd; |
406 | struct hclge_desc desc; | 406 | struct hclge_desc desc; |
407 | u32 shapping_para = 0; | ||
408 | u8 ir_u, ir_b, ir_s; | 407 | u8 ir_u, ir_b, ir_s; |
408 | u32 shapping_para; | ||
409 | int ret; | 409 | int ret; |
410 | 410 | ||
411 | ret = hclge_shaper_para_calc(hdev->hw.mac.speed, | 411 | ret = hclge_shaper_para_calc(hdev->hw.mac.speed, |
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c index 55d3c784f2d4..4c2c9458648f 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_cmd.c | |||
@@ -43,7 +43,7 @@ static int hclgevf_cmd_csq_clean(struct hclgevf_hw *hw) | |||
43 | { | 43 | { |
44 | struct hclgevf_dev *hdev = container_of(hw, struct hclgevf_dev, hw); | 44 | struct hclgevf_dev *hdev = container_of(hw, struct hclgevf_dev, hw); |
45 | struct hclgevf_cmq_ring *csq = &hw->cmq.csq; | 45 | struct hclgevf_cmq_ring *csq = &hw->cmq.csq; |
46 | int clean = 0; | 46 | int clean; |
47 | u32 head; | 47 | u32 head; |
48 | 48 | ||
49 | head = hclgevf_read_dev(hw, HCLGEVF_NIC_CSQ_HEAD_REG); | 49 | head = hclgevf_read_dev(hw, HCLGEVF_NIC_CSQ_HEAD_REG); |
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c index defc90595a4b..594cae8c7410 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | |||
@@ -2302,7 +2302,7 @@ static void hclgevf_uninit_msi(struct hclgevf_dev *hdev) | |||
2302 | 2302 | ||
2303 | static int hclgevf_misc_irq_init(struct hclgevf_dev *hdev) | 2303 | static int hclgevf_misc_irq_init(struct hclgevf_dev *hdev) |
2304 | { | 2304 | { |
2305 | int ret = 0; | 2305 | int ret; |
2306 | 2306 | ||
2307 | hclgevf_get_misc_vector(hdev); | 2307 | hclgevf_get_misc_vector(hdev); |
2308 | 2308 | ||