Commit 4ecffca6 authored by mufengyan's avatar mufengyan Committed by mufengyan
Browse files

UNIC: Eliminate compile warnings

driver inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IB1JVU


CVE: NA

-------------------------------------------------------------------

Eliminate compile warnings when the option CONFIG_HNS3_UBL haven't
been set.

Signed-off-by: default avatarmufengyan <mufengyan@hisilicon.com>
parent cc5e1415
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2246,6 +2246,7 @@ static const struct ethtool_ops hns3vf_ethtool_ops = {
	.reset = hns3_set_reset,
};

#ifdef CONFIG_HNS3_UBL
static const struct ethtool_ops hns3_unic_ethtool_ops = {
	.supported_coalesce_params = HNS3_ETHTOOL_COALESCE,
	.supported_ring_params = HNS3_ETHTOOL_RING,
@@ -2287,6 +2288,7 @@ static const struct ethtool_ops hns3_unic_ethtool_ops = {
	.reset = hns3_set_reset,
	.get_link_ext_state = hns3_get_link_ext_state,
};
#endif

static const struct ethtool_ops hns3_ethtool_ops = {
	.supported_coalesce_params = HNS3_ETHTOOL_COALESCE,
+1 −2
Original line number Diff line number Diff line
@@ -11409,7 +11409,6 @@ static int hclge_set_mtu(struct hnae3_handle *handle, int new_mtu)

int hclge_set_vport_mtu(struct hclge_vport *vport, int new_mtu)
{
	struct hnae3_ae_dev *ae_dev = pci_get_drvdata(vport->nic.pdev);
	int l2_hlen = ETH_HLEN + ETH_FCS_LEN + 2 * VLAN_HLEN;
	int default_size = HCLGE_MAC_DEFAULT_FRAME;
	int min_frm_size = HCLGE_MAC_MIN_FRAME;
@@ -11417,7 +11416,7 @@ int hclge_set_vport_mtu(struct hclge_vport *vport, int new_mtu)
	int i, max_frm_size, ret;

#ifdef CONFIG_HNS3_UBL
	if (hnae3_dev_ubl_supported(ae_dev)) {
	if (hnae3_dev_ubl_supported(hdev->ae_dev)) {
		/* UB MTU */
		l2_hlen = 0;
		min_frm_size = UB_MIN_MTU;
+1 −3
Original line number Diff line number Diff line
@@ -1062,15 +1062,13 @@ static int hclge_mbx_get_link_mode_handler(struct hclge_mbx_ops_param *param)
static int
hclge_mbx_get_vf_flr_status_handler(struct hclge_mbx_ops_param *param)
{
	struct hclge_dev *hdev = param->vport->back;

	hclge_rm_vport_all_mac_table(param->vport, false,
				     HCLGE_MAC_ADDR_UC);
	hclge_rm_vport_all_mac_table(param->vport, false,
				     HCLGE_MAC_ADDR_MC);
	hclge_rm_vport_all_vlan_table(param->vport, false);
#ifdef CONFIG_HNS3_UBL
	if (hnae3_dev_ubl_supported(hdev->ae_dev)) {
	if (hnae3_dev_ubl_supported(param->vport->back->ae_dev)) {
		hclge_unic_del_vport_all_mc_guid_table(param->vport, false);
		hclge_unic_rm_vport_all_ip_table(param->vport, false);
	}