From patchwork Fri Sep 21 15:41:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 147298 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp971311ljw; Fri, 21 Sep 2018 08:43:31 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda25IYCdpXxYKex6cxi2hQraRDEAXTc01wWjfLas/rBU8koWRhcoLBX3eU7QYjc1fkxd6R7 X-Received: by 2002:a17:902:1001:: with SMTP id b1-v6mr45123324pla.155.1537544611432; Fri, 21 Sep 2018 08:43:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537544611; cv=none; d=google.com; s=arc-20160816; b=cVWMaoB6kmk3g8+5CE+1agk6hvfy8f8KCAjeeW81DWF7zxC8VuhCPVORWb+uYPZCpu VtL2fe5bj/jA7L/nVlPWXR2R6BFyMmpkQSpshOZOiYsiGcc3lzBSivaGu3WMQ4auRRFK fvDCR57UAFZl4Jq7BQMVOX6eit9O4xQO53ItzD34lDAtf3P1nHywMvKRZNmtXs0Em1fx QlTXO+2AHR7M7BuzW1Ny+aPOK4+w+/e7E5qplJ56t7wmCEM7zNS4U2wl2c5G1mEQ8Mbk 66gt4DOZFX4l61OnPQlaX8ky1BEtIhmfUcZqXCDWhhLojTUhmA2noXG8yz11z4QyEa+e ngMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=pKSiClFVcApFUzQZyotNAYgCR49mVLHIgITe7it1k4E=; b=s/Y6aoczyxWQ/QmwCOcs1eR3LhAoIHU4bUujapoxgc25nk9IDXIEDja7jg0j8qF3Nq vZUZdH0/IPUgHdZM6lniM9VV+ZhhH5lssjbbCioj5Rhq+Y92PpECwSyEl+zUaqhvDwSa OOFIVTQX5ZrVWZ0xqRsYpj9Tt/P3ZFbb+mFviiRl/Wp6ndd8oRPwHbJyHcKe/UaRLrcX gSIeYd1UhWvUjWDQ6ZN8f3AdqSulJRWpn3JjRrNCg8ia5TTxEm09RmzhSClh0tAZ1JNg 5nXSpAxoksb55HH8XQFrTY6wI+vTM8HiyD/WV3z1w9FxHPKv8CO8PQDpMHlOBQhN1F46 8J0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q16-v6si26279970pgm.185.2018.09.21.08.43.30; Fri, 21 Sep 2018 08:43:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390829AbeIUVcy (ORCPT + 32 others); Fri, 21 Sep 2018 17:32:54 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:13101 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390678AbeIUVcy (ORCPT ); Fri, 21 Sep 2018 17:32:54 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 5045A904337F8; Fri, 21 Sep 2018 23:43:23 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.226.54) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.399.0; Fri, 21 Sep 2018 23:43:15 +0800 From: Salil Mehta To: CC: , , , , , , , Fuyun Liang Subject: [PATCH net-next 12/12] net: hns3: Remove redundant hclge_get_port_type() Date: Fri, 21 Sep 2018 16:41:48 +0100 Message-ID: <20180921154148.26756-13-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180921154148.26756-1-salil.mehta@huawei.com> References: <20180921154148.26756-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Li This patch removes hclge_get_port_type which is redundant. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 - .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 22 ---------------------- 2 files changed, 23 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h index fc87e1b..564afd4 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h @@ -411,7 +411,6 @@ struct hnae3_ae_ops { void (*get_link_mode)(struct hnae3_handle *handle, unsigned long *supported, unsigned long *advertising); - void (*get_port_type)(struct hnae3_handle *handle, u8 *port_type); }; struct hnae3_dcb_ops { diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 73d9d0d..2de5a00 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -5970,27 +5970,6 @@ static void hclge_get_link_mode(struct hnae3_handle *handle, } } -static void hclge_get_port_type(struct hnae3_handle *handle, - u8 *port_type) -{ - struct hclge_vport *vport = hclge_get_vport(handle); - struct hclge_dev *hdev = vport->back; - u8 media_type = hdev->hw.mac.media_type; - - switch (media_type) { - case HNAE3_MEDIA_TYPE_FIBER: - *port_type = PORT_FIBRE; - break; - case HNAE3_MEDIA_TYPE_COPPER: - *port_type = PORT_TP; - break; - case HNAE3_MEDIA_TYPE_UNKNOWN: - default: - *port_type = PORT_OTHER; - break; - } -} - static const struct hnae3_ae_ops hclge_ops = { .init_ae_dev = hclge_init_ae_dev, .uninit_ae_dev = hclge_uninit_ae_dev, @@ -6048,7 +6027,6 @@ static const struct hnae3_ae_ops hclge_ops = { .get_regs = hclge_get_regs, .set_led_id = hclge_set_led_id, .get_link_mode = hclge_get_link_mode, - .get_port_type = hclge_get_port_type, }; static struct hnae3_ae_algo ae_algo = {