diff mbox series

[RFCv2,net-next,017/167] net: convert the prototype of hsr_features_recompute

Message ID 20210929155334.12454-18-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:51 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
hsr_features_recompute for adaption.

Signed-off-by: Jian Shen <shenjian15@huawei.com>
---
 net/hsr/hsr_device.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index 16e0efd8b528..7e6dd372711f 100644
--- a/net/hsr/hsr_device.c
+++ b/net/hsr/hsr_device.c
@@ -177,13 +177,13 @@  static int hsr_dev_close(struct net_device *dev)
 	return 0;
 }
 
-static netdev_features_t hsr_features_recompute(struct hsr_priv *hsr,
-						netdev_features_t features)
+static void hsr_features_recompute(struct hsr_priv *hsr,
+				   netdev_features_t *features)
 {
 	netdev_features_t mask;
 	struct hsr_port *port;
 
-	mask = features;
+	mask = *features;
 
 	/* Mask out all features that, if supported by one device, should be
 	 * enabled for all devices (see NETIF_F_ONE_FOR_ALL).
@@ -192,12 +192,10 @@  static netdev_features_t hsr_features_recompute(struct hsr_priv *hsr,
 	 * that were in features originally, and also is in NETIF_F_ONE_FOR_ALL,
 	 * may become enabled.
 	 */
-	features &= ~NETIF_F_ONE_FOR_ALL;
+	*features &= ~NETIF_F_ONE_FOR_ALL;
 	hsr_for_each_port(hsr, port)
-		netdev_increment_features(&features, features,
+		netdev_increment_features(features, *features,
 					  port->dev->features, mask);
-
-	return features;
 }
 
 static void hsr_fix_features(struct net_device *dev,
@@ -205,7 +203,7 @@  static void hsr_fix_features(struct net_device *dev,
 {
 	struct hsr_priv *hsr = netdev_priv(dev);
 
-	*features = hsr_features_recompute(hsr, *features);
+	hsr_features_recompute(hsr, features);
 }
 
 static netdev_tx_t hsr_dev_xmit(struct sk_buff *skb, struct net_device *dev)