Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebfefb8a authored by Peng Li's avatar Peng Li Committed by David S. Miller
Browse files

net: hns3: Remove redundant hclge_get_port_type()



This patch removes hclge_get_port_type which is redundant.

Signed-off-by: default avatarFuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarSalil Mehta <salil.mehta@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5f373b15
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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 {
+0 −22
Original line number Diff line number Diff line
@@ -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 = {