Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1558imm; Fri, 21 Sep 2018 08:44:11 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaKrWT/UEmK68sUwQt3bPdzqc80pX/H132Rjxh2oCqPNETvCvj7A1NUXs3YJo4ISLtXmaC1 X-Received: by 2002:a62:2c53:: with SMTP id s80-v6mr46482474pfs.154.1537544651300; Fri, 21 Sep 2018 08:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537544651; cv=none; d=google.com; s=arc-20160816; b=VFAX22nunTJLbm0+oj3p+ScuX6BwQgW80XC8cyaZHqCQCJqETVGMz2Y5aMZe4qAPpM 5al+Koauyby/mbRs3ig0hphDkptkHPGcVcnwDcdmtlWRSgp1CbcxQew3lW9L/2t6H4nm XC+dVrKnKMF/XSLYZ20FgrOnGkRE2GevWJ9FpaBLQ9BuqSptYLn4u7SERAKChW1L5BAJ whzcXOAyNsopkEMU4AvRU25i30Olg7/A51Pj628G/J2vOOYDEIQ+h4AGtQfMxHQu8TZa XeDx/659qJD4g5hFIh1sNeDm+H+P6etRUYW7oQcFHeJ9HtGCNPQ4NPFhSyt4ZMO2rvJh brNw== 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 r12-v6si27271660plo.105.2018.09.21.08.43.51; Fri, 21 Sep 2018 08:44:11 -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 S2390822AbeIUVcy (ORCPT + 99 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 Content-Type: text/plain 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(-) 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 = { -- 2.7.4