diff mbox series

[RFCv8,net-next,53/55] net: sfc: adjust the prototype of xxx_supported_features()

Message ID 20220918094336.28958-54-shenjian15@huawei.com (mailing list archive)
State RFC
Delegated to: Netdev Maintainers
Headers show
Series net: extend the type of netdev_features_t to bitmap | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next, async
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count fail Series longer than 15 patches (and no cover letter)
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 2 this patch: 2
netdev/cc_maintainers warning 3 maintainers not CCed: edumazet@google.com habetsm.xilinx@gmail.com pabeni@redhat.com
netdev/build_clang fail Errors and warnings before: 250 this patch: 250
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn fail Errors and warnings before: 10 this patch: 10
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 59 lines checked
netdev/kdoc success Errors and warnings before: 148 this patch: 148
netdev/source_inline success Was 0 now: 0

Commit Message

shenjian (K) Sept. 18, 2022, 9:43 a.m. UTC
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(-)
diff mbox series

Patch

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. */