Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp723892pxk; Thu, 24 Sep 2020 17:30:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6WImfa0Go58RTXBzhilt2b8RCRwrRsU6mDtfTw8Lo0eR3BJD0TPCPOTnn6TJSdXLycPYy X-Received: by 2002:a17:906:e88:: with SMTP id p8mr259384ejf.134.1600993820719; Thu, 24 Sep 2020 17:30:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600993820; cv=none; d=google.com; s=arc-20160816; b=obHqZZg/mDed7/9GC6fAQJkC33vFDedROEh0+ha13okR589GXN4mfda9uJZe5E8bc+ H6VRYOTnzEXJJM52WKFvsCaihjRwwpd6TCiJGwjEa7ea1c31D3O+1K81WDqG2OqF8MIA UIttrFzCie29AhxgZsRczBAT1+3sDuDnyBCipSevgauK9XdGgpzq3blM5D9v6eCxrE7J 0zYhkp5lzap/gqQl27cZLTfAxqCvdx9ZcvfLfJIzJI/W28xis82sWlbTpT4Jnxqy1qkp tg8VesQE4AJhcMo0iZ9w91ugMSgIkYc4uf5RNQT3kMvdEBXxezFIBm0KMAiiJ/Y8CEKw lYdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=AzN9i21tRksa6OafNQT2Ai74cvS3ZHouP94xjre0V+8=; b=JH97h7sukfHDnRT1yZiC9I8j8eZVsvEcjaXOY0VZi5T3UcM+BvUwemGvxO0F+VSuhr zp7HkHV/0NPq9bFU03C/nLAsr8dluprfFMxVyowFJB08eWHImlZAhH2k+UtNSK5q25v1 7pMGf9Lk3ZvrYKPRbCdmjIGnsW8CF6FkHGVT7WINaCEJoOJ7dHpCPsf2eNa+g2qplPsR HCzEUgD45+N+qtex8gepyVsyIioKitiYGMudHK8++X1hQAfLJQ8MgNfzyw+YPFz1k7fG haUCUJHLaRY1MkMMJ8VQDju065lw900r6pm4ulEQdVwziiAeigDewXxcNqpZQ4R0Ldbe YiNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y25si674454edt.563.2020.09.24.17.29.58; Thu, 24 Sep 2020 17:30:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726931AbgIYA3C (ORCPT + 99 others); Thu, 24 Sep 2020 20:29:02 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:14278 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726694AbgIYA3B (ORCPT ); Thu, 24 Sep 2020 20:29:01 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id CF303DA0153B6FBC5FDA; Fri, 25 Sep 2020 08:28:58 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Fri, 25 Sep 2020 08:28:52 +0800 From: Huazhong Tan To: CC: , , , , , , Yufeng Mo , Huazhong Tan Subject: [PATCH net-next 1/6] net: hns3: refactor the function for dumping tc information in debugfs Date: Fri, 25 Sep 2020 08:26:13 +0800 Message-ID: <1600993578-41008-2-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600993578-41008-1-git-send-email-tanhuazhong@huawei.com> References: <1600993578-41008-1-git-send-email-tanhuazhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yufeng Mo Remove some unnecessary parameters of hclge_title_idx_print(), and rename this function for readability. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan --- .../net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c index 26f6f06..28be561 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c @@ -428,17 +428,13 @@ static void hclge_dbg_dump_reg_cmd(struct hclge_dev *hdev, const char *cmd_buf) } } -static void hclge_title_idx_print(struct hclge_dev *hdev, bool flag, int index, - char *title_buf, char *true_buf, - char *false_buf) +static void hclge_print_tc_info(struct hclge_dev *hdev, bool flag, int index) { if (flag) - dev_info(&hdev->pdev->dev, "%s(%d): %s weight: %u\n", - title_buf, index, true_buf, - hdev->tm_info.pg_info[0].tc_dwrr[index]); + dev_info(&hdev->pdev->dev, "tc(%d): no sp mode weight: %u\n", + index, hdev->tm_info.pg_info[0].tc_dwrr[index]); else - dev_info(&hdev->pdev->dev, "%s(%d): %s\n", title_buf, index, - false_buf); + dev_info(&hdev->pdev->dev, "tc(%d): sp mode\n", index); } static void hclge_dbg_dump_tc(struct hclge_dev *hdev) @@ -469,8 +465,7 @@ static void hclge_dbg_dump_tc(struct hclge_dev *hdev) ets_weight->weight_offset); for (i = 0; i < HNAE3_MAX_TC; i++) - hclge_title_idx_print(hdev, ets_weight->tc_weight[i], i, - "tc", "no sp mode", "sp mode"); + hclge_print_tc_info(hdev, ets_weight->tc_weight[i], i); } static void hclge_dbg_dump_tm_pg(struct hclge_dev *hdev) -- 2.7.4