Skip to content

Commit

Permalink
net: hns3: Remove redundant hclge_get_port_type()
Browse files Browse the repository at this point in the history
This patch removes hclge_get_port_type which is redundant.

Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Peng Li authored and David S. Miller committed Sep 22, 2018
1 parent 5f373b1 commit ebfefb8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
1 change: 0 additions & 1 deletion drivers/net/ethernet/hisilicon/hns3/hnae3.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
22 changes: 0 additions & 22 deletions drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit ebfefb8

Please sign in to comment.