diff mbox series

[RFCv2,net-next,002/167] net: convert the prototype of netdev_get_wanted_features

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

Commit Message

shenjian (K) Sept. 29, 2021, 3:50 p.m. UTC
For the origin type for netdev_features_t would be changed to
be unsigned long * from u64, so changes the prototype of
netdev_get_wanted_features for adaption.

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

Patch

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 5d5129d4791f..a5598d617789 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -5031,10 +5031,10 @@  static inline void netdev_intersect_features(netdev_features_t *ret,
 	*ret = f1 & f2;
 }
 
-static inline netdev_features_t netdev_get_wanted_features(
-	struct net_device *dev)
+static inline void netdev_get_wanted_features(struct net_device *dev,
+					      netdev_features_t *wanted)
 {
-	return (dev->features & ~dev->hw_features) | dev->wanted_features;
+	*wanted = (dev->features & ~dev->hw_features) | dev->wanted_features;
 }
 netdev_features_t netdev_increment_features(netdev_features_t all,
 	netdev_features_t one, netdev_features_t mask);
diff --git a/net/core/dev.c b/net/core/dev.c
index 6ee56cd01d53..e2b4ae74c999 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -9939,7 +9939,7 @@  int __netdev_update_features(struct net_device *dev)
 
 	ASSERT_RTNL();
 
-	features = netdev_get_wanted_features(dev);
+	netdev_get_wanted_features(dev, &features);
 
 	if (dev->netdev_ops->ndo_fix_features)
 		features = dev->netdev_ops->ndo_fix_features(dev, features);