diff mbox series

[RFCv8,net-next,37/55] net: adjust the prototype of netdev_add_tso_features()

Message ID 20220918094336.28958-38-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: 4384 this patch: 4384
netdev/cc_maintainers warning 9 maintainers not CCed: edumazet@google.com j.vosburgh@gmail.com bridge@lists.linux-foundation.org pabeni@redhat.com jiri@resnulli.us andy@greyhouse.net vfalico@gmail.com razor@blackwall.org roopa@nvidia.com
netdev/build_clang fail Errors and warnings before: 14923 this patch: 15023
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: 3922 this patch: 3922
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 38 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

shenjian (K) Sept. 18, 2022, 9:43 a.m. UTC
The function netdev_add_tos_features() using netdev_features_t
as parameters, and returns 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, change
the prototype of input features to ‘netdev_features_t *',
and return the features pointer as output parameters.

Signed-off-by: Jian Shen <shenjian15@huawei.com>
---
 drivers/net/bonding/bond_main.c | 2 +-
 drivers/net/team/team.c         | 2 +-
 include/linux/netdevice.h       | 7 +++----
 net/bridge/br_if.c              | 2 +-
 4 files changed, 6 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 5c76a55392aa..a50f8935658a 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1420,7 +1420,7 @@  static netdev_features_t bond_fix_features(struct net_device *dev,
 		netdev_increment_features(&features, &features,
 					  &slave->dev->features, &mask);
 	}
-	features = netdev_add_tso_features(features, mask);
+	netdev_add_tso_features(&features, &mask);
 
 	return features;
 }
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 8d3a97d2d1dc..508424471c28 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -2018,7 +2018,7 @@  static netdev_features_t team_fix_features(struct net_device *dev,
 	}
 	rcu_read_unlock();
 
-	features = netdev_add_tso_features(features, mask);
+	netdev_add_tso_features(&features, &mask);
 
 	return features;
 }
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 3f451906d62c..ec9e7cf7efbc 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -4899,11 +4899,10 @@  void netdev_increment_features(netdev_features_t *ret,
  * Performing the GSO segmentation before last device
  * is a performance improvement.
  */
-static inline netdev_features_t netdev_add_tso_features(netdev_features_t features,
-							netdev_features_t mask)
+static inline void netdev_add_tso_features(netdev_features_t *features,
+					   const netdev_features_t *mask)
 {
-	netdev_increment_features(&features, &features, &NETIF_F_ALL_TSO, &mask);
-	return features;
+	netdev_increment_features(features, features, &NETIF_F_ALL_TSO, mask);
 }
 
 int __netdev_update_features(struct net_device *dev);
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index fa348a984aa9..2a9b564ff234 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -548,7 +548,7 @@  netdev_features_t br_features_recompute(struct net_bridge *br,
 		netdev_increment_features(&features, &features,
 					  &p->dev->features, &mask);
 	}
-	features = netdev_add_tso_features(features, mask);
+	netdev_add_tso_features(&features, &mask);
 
 	return features;
 }