tegra_hv_net: Fix wrong var type

mac_address is defined wrongly and it does not
match the return type of function of_get_mac_address.

Bug 3974840

Signed-off-by: Bruce Xu <brucex@nvidia.com>
Change-Id: I582c3755b0e2121b2e937dc77b3f9af8694e4357
(cherry picked from commit 8f8de48950266048eaf142cbdec66b1b7ccf0737)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2859221
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
brucex
2023-02-16 15:13:08 +08:00
committed by mobile promotions
parent 3a6ae071af
commit 1ce0ed3f5b

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */ /* SPDX-License-Identifier: GPL-2.0-only */
/* /*
* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*/ */
#undef DEBUG #undef DEBUG
@@ -114,7 +114,7 @@ struct tegra_hv_net {
struct platform_device *pdev; struct platform_device *pdev;
struct net_device *ndev; struct net_device *ndev;
struct tegra_hv_ivc_cookie *ivck; struct tegra_hv_ivc_cookie *ivck;
const void *mac_address; int mac_address;
struct napi_struct napi; struct napi_struct napi;
struct tegra_hv_net_stats __percpu *stats; struct tegra_hv_net_stats __percpu *stats;
@@ -702,7 +702,7 @@ static int tegra_hv_net_probe(struct platform_device *pdev)
/* get mac address from the DT */ /* get mac address from the DT */
hvn->mac_address = of_get_mac_address(dev->of_node, ndev->dev_addr); hvn->mac_address = of_get_mac_address(dev->of_node, ndev->dev_addr);
if (IS_ERR_OR_NULL(hvn->mac_address)) { if (IS_ERR(&hvn->mac_address)) {
if (of_property_read_bool(dev->of_node, "use-random-mac-addr")) if (of_property_read_bool(dev->of_node, "use-random-mac-addr"))
eth_hw_addr_random(ndev); eth_hw_addr_random(ndev);
else { else {
@@ -729,7 +729,7 @@ static int tegra_hv_net_probe(struct platform_device *pdev)
} }
} else { } else {
/* Set the MAC address. */ /* Set the MAC address. */
ether_addr_copy(ndev->dev_addr, hvn->mac_address); ether_addr_copy(ndev->dev_addr, (const u8 *)&hvn->mac_address);
} }
hvn->xmit_wq = alloc_workqueue("tgvnet-wq-%d", hvn->xmit_wq = alloc_workqueue("tgvnet-wq-%d",