From: Guangbin Huang huangguangbin2@huawei.com
driver inclusion category: bugfix bugzilla: NA CVE: NA
This patch modifies one code logic in hclge_init_kdump_kernel_config() function to reduce the indentation level, and it does not affect the original process logic of the code.
Signed-off-by: Guangbin Huang huangguangbin2@huawei.com Reviewed-by: Yunsheng Lin linyunsheng@huawei.com Reviewed-by: Zhong Zhaohui zhongzhaohui@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 4edec73..3e17d11 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -1365,15 +1365,16 @@ static void hclge_init_kdump_kernel_config(struct hclge_dev *hdev) #define HCLGE_MIN_TX_DESC 64 #define HCLGE_MIN_RX_DESC 64
- if (is_kdump_kernel()) { - dev_info(&hdev->pdev->dev, - "Running kdump kernel. Using minimal resources\n"); + if (!is_kdump_kernel()) + return;
- /* minimal queue pairs equals to the number of vports */ - hdev->num_tqps = hdev->num_vmdq_vport + hdev->num_req_vfs + 1; - hdev->num_tx_desc = HCLGE_MIN_TX_DESC; - hdev->num_rx_desc = HCLGE_MIN_RX_DESC; - } + dev_info(&hdev->pdev->dev, + "Running kdump kernel. Using minimal resources\n"); + + /* minimal queue pairs equals to the number of vports */ + hdev->num_tqps = hdev->num_vmdq_vport + hdev->num_req_vfs + 1; + hdev->num_tx_desc = HCLGE_MIN_TX_DESC; + hdev->num_rx_desc = HCLGE_MIN_RX_DESC; }
static int hclge_configure(struct hclge_dev *hdev)