mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
net: nvethernet: Fix build for Linux v6.4
In Linux v6.4, commit
3948b05950fd ("net: introduce a config option to tweak MAX_SKB_FRAGS")
added a kernel config option for MAX_SKB_FRAGS and change the type of
the definition to integer. This causes the nvethernet driver build to
fail and the following errors are seen ...
drivers/net/ethernet/nvidia/nvethernet/ether_linux.c:5949:33: error:
format ‘%ld’ expects argument of type ‘long int’, but argument 4
has type ‘nveu32_t’ {aka ‘unsigned int’} [-Werror=format=]
"invalid tx-frames, must be inrange %d to %ld",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/nvidia/nvethernet/ethtool.c:950:28: error: format
‘%ld’ expects argument of type ‘long int’, but argument 4 has
type ‘nveu32_t’ {aka ‘unsigned int’} [-Werror=format=]
"invalid tx-frames, must be in the range of"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix this by changing the type in the respective prints to integer. Note
that his is also to make this change for kernel prior to Linux v6.4.
Bug 4183168
Bug 4221847
Change-Id: Ibd9160ad08e65e0b85cae1cf4903075c31a1cd77
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2989002
Reviewed-by: Shanker Donthineni <sdonthineni@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
1c89d6b9cd
commit
ed130f099a
@@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/* Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved */
|
// Copyright (c) 2019-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
|
|
||||||
#include <nvidia/conftest.h>
|
#include <nvidia/conftest.h>
|
||||||
|
|
||||||
@@ -5948,7 +5948,11 @@ static int ether_parse_dt(struct ether_priv_data *pdata)
|
|||||||
if (osi_dma->tx_frames > ETHER_TX_MAX_FRAME(osi_dma->tx_ring_sz) ||
|
if (osi_dma->tx_frames > ETHER_TX_MAX_FRAME(osi_dma->tx_ring_sz) ||
|
||||||
osi_dma->tx_frames < ETHER_MIN_TX_COALESCE_FRAMES) {
|
osi_dma->tx_frames < ETHER_MIN_TX_COALESCE_FRAMES) {
|
||||||
dev_err(dev,
|
dev_err(dev,
|
||||||
|
#ifdef CONFIG_MAX_SKB_FRAGS
|
||||||
|
"invalid tx-frames, must be inrange %d to %d",
|
||||||
|
#else
|
||||||
"invalid tx-frames, must be inrange %d to %ld",
|
"invalid tx-frames, must be inrange %d to %ld",
|
||||||
|
#endif
|
||||||
ETHER_MIN_TX_COALESCE_FRAMES,
|
ETHER_MIN_TX_COALESCE_FRAMES,
|
||||||
ETHER_TX_MAX_FRAME(osi_dma->tx_ring_sz));
|
ETHER_TX_MAX_FRAME(osi_dma->tx_ring_sz));
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/* Copyright (c) 2019-2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved */
|
// Copyright (c) 2019-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
|
|
||||||
#include <nvidia/conftest.h>
|
#include <nvidia/conftest.h>
|
||||||
|
|
||||||
@@ -950,7 +950,11 @@ static int ether_set_coalesce(struct net_device *dev,
|
|||||||
(ec->tx_max_coalesced_frames < ETHER_MIN_TX_COALESCE_FRAMES)) {
|
(ec->tx_max_coalesced_frames < ETHER_MIN_TX_COALESCE_FRAMES)) {
|
||||||
netdev_err(dev,
|
netdev_err(dev,
|
||||||
"invalid tx-frames, must be in the range of"
|
"invalid tx-frames, must be in the range of"
|
||||||
|
#ifdef CONFIG_MAX_SKB_FRAGS
|
||||||
|
" %d to %d frames\n", ETHER_MIN_TX_COALESCE_FRAMES,
|
||||||
|
#else
|
||||||
" %d to %ld frames\n", ETHER_MIN_TX_COALESCE_FRAMES,
|
" %d to %ld frames\n", ETHER_MIN_TX_COALESCE_FRAMES,
|
||||||
|
#endif
|
||||||
ETHER_TX_MAX_FRAME(osi_dma->tx_ring_sz));
|
ETHER_TX_MAX_FRAME(osi_dma->tx_ring_sz));
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user