[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220918094336.28958-54-shenjian15@huawei.com>
Date: Sun, 18 Sep 2022 09:43:34 +0000
From: Jian Shen <shenjian15@...wei.com>
To: <davem@...emloft.net>, <kuba@...nel.org>, <ecree.xilinx@...il.com>,
<andrew@...n.ch>, <hkallweit1@...il.com>,
<alexandr.lobakin@...el.com>, <saeed@...nel.org>, <leon@...nel.org>
CC: <netdev@...r.kernel.org>, <linuxarm@...wei.com>
Subject: [RFCv8 PATCH net-next 53/55] net: sfc: adjust the prototype of xxx_supported_features()
The function xxx_supported_features() of sfc driver return
netdev_features_t directly.
For the prototype of netdev_features_t will be extended to be
larger than 8 bytes, so change the prototype of the function,
return the features pointer as output parameter.
Signed-off-by: Jian Shen <shenjian15@...wei.com>
---
drivers/net/ethernet/sfc/falcon/net_driver.h | 8 +++-----
drivers/net/ethernet/sfc/mcdi_filters.c | 2 +-
drivers/net/ethernet/sfc/net_driver.h | 8 +++-----
drivers/net/ethernet/sfc/siena/net_driver.h | 8 +++-----
4 files changed, 10 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ethernet/sfc/falcon/net_driver.h b/drivers/net/ethernet/sfc/falcon/net_driver.h
index 35fa95504a5f..d23912406c69 100644
--- a/drivers/net/ethernet/sfc/falcon/net_driver.h
+++ b/drivers/net/ethernet/sfc/falcon/net_driver.h
@@ -1299,14 +1299,12 @@ static inline struct ef4_rx_buffer *ef4_rx_buffer(struct ef4_rx_queue *rx_queue,
* If a feature is fixed, it does not present in hw_features, but
* always in features.
*/
-static inline netdev_features_t ef4_supported_features(const struct ef4_nic *efx)
+static inline void ef4_supported_features(const struct ef4_nic *efx,
+ netdev_features_t *features)
{
const struct net_device *net_dev = efx->net_dev;
- netdev_features_t features;
- netdev_features_or(features, net_dev->features, net_dev->hw_features);
-
- return features;
+ netdev_features_or(*features, net_dev->features, net_dev->hw_features);
}
/* Get the current TX queue insert index. */
diff --git a/drivers/net/ethernet/sfc/mcdi_filters.c b/drivers/net/ethernet/sfc/mcdi_filters.c
index fb4db91f4d8f..99c85b51a487 100644
--- a/drivers/net/ethernet/sfc/mcdi_filters.c
+++ b/drivers/net/ethernet/sfc/mcdi_filters.c
@@ -1324,7 +1324,7 @@ int efx_mcdi_filter_table_probe(struct efx_nic *efx, bool multicast_chaining)
rc = efx_mcdi_filter_table_probe_matches(efx, table, true);
if (rc)
goto fail;
- feats = efx_supported_features(efx);
+ efx_supported_features(efx, &feats);
if (netdev_feature_test(NETIF_F_HW_VLAN_CTAG_FILTER_BIT, feats) &&
!(efx_mcdi_filter_match_supported(table, false,
(EFX_FILTER_MATCH_OUTER_VID | EFX_FILTER_MATCH_LOC_MAC)) &&
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
index dae500645595..20db4472bbe9 100644
--- a/drivers/net/ethernet/sfc/net_driver.h
+++ b/drivers/net/ethernet/sfc/net_driver.h
@@ -1750,14 +1750,12 @@ efx_channel_tx_old_fill_level(struct efx_channel *channel)
* If a feature is fixed, it does not present in hw_features, but
* always in features.
*/
-static inline netdev_features_t efx_supported_features(const struct efx_nic *efx)
+static inline void efx_supported_features(const struct efx_nic *efx,
+ netdev_features_t *features)
{
const struct net_device *net_dev = efx->net_dev;
- netdev_features_t features;
- netdev_features_or(features, net_dev->features, net_dev->hw_features);
-
- return features;
+ netdev_features_or(*features, net_dev->features, net_dev->hw_features);
}
/* Get the current TX queue insert index. */
diff --git a/drivers/net/ethernet/sfc/siena/net_driver.h b/drivers/net/ethernet/sfc/siena/net_driver.h
index 7040cfccd556..1420522bd0e6 100644
--- a/drivers/net/ethernet/sfc/siena/net_driver.h
+++ b/drivers/net/ethernet/sfc/siena/net_driver.h
@@ -1678,14 +1678,12 @@ efx_channel_tx_old_fill_level(struct efx_channel *channel)
* If a feature is fixed, it does not present in hw_features, but
* always in features.
*/
-static inline netdev_features_t efx_supported_features(const struct efx_nic *efx)
+static inline void efx_supported_features(const struct efx_nic *efx,
+ netdev_features_t *features)
{
const struct net_device *net_dev = efx->net_dev;
- netdev_features_t features;
- netdev_features_or(features, net_dev->features, net_dev->hw_features);
-
- return features;
+ netdev_features_or(*features, net_dev->features, net_dev->hw_features);
}
/* Get the current TX queue insert index. */
--
2.33.0
Powered by blists - more mailing lists