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(-)
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);