Message ID | 20220419022206.36381-16-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 |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for net-next, async |
netdev/apply | fail | Patch does not apply to net-next |
diff --git a/net/core/dev.c b/net/core/dev.c index 7f75084bcaa7..03e64399c7b4 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -9591,8 +9591,8 @@ static netdev_features_t netdev_fix_features(struct net_device *dev, } if (netdev_feature_test(NETIF_F_HW_TLS_TX_BIT, features)) { - bool ip_csum = (features & netdev_ip_csum_features) == - netdev_ip_csum_features; + bool ip_csum = netdev_features_subset(features, + netdev_ip_csum_features); bool hw_csum = netdev_feature_test(NETIF_F_HW_CSUM_BIT, features);
Replace the '(f1 & f2) == f2' operations of features by netdev_features_subset helpers. Signed-off-by: Jian Shen <shenjian15@huawei.com> --- net/core/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)