@@ -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. */
@@ -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)) &&
@@ -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. */
@@ -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. */
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@huawei.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(-)