diff --git a/poky/meta/classes/features_check.bbclass b/poky/meta/classes/features_check.bbclass
index 876d32e..b3c8047 100644
--- a/poky/meta/classes/features_check.bbclass
+++ b/poky/meta/classes/features_check.bbclass
@@ -1,23 +1,13 @@
-# Allow checking of required and conflicting DISTRO_FEATURES
+# Allow checking of required and conflicting features
 #
-# ANY_OF_DISTRO_FEATURES:     ensure at least one item on this list is included
-#                             in DISTRO_FEATURES.
-# REQUIRED_DISTRO_FEATURES:   ensure every item on this list is included
-#                             in DISTRO_FEATURES.
-# CONFLICT_DISTRO_FEATURES:   ensure no item in this list is included in
-#                             DISTRO_FEATURES.
-# ANY_OF_MACHINE_FEATURES:    ensure at least one item on this list is included
-#                             in MACHINE_FEATURES.
-# REQUIRED_MACHINE_FEATURES:  ensure every item on this list is included
-#                             in MACHINE_FEATURES.
-# CONFLICT_MACHINE_FEATURES:  ensure no item in this list is included in
-#                             MACHINE_FEATURES.
-# ANY_OF_COMBINED_FEATURES:   ensure at least one item on this list is included
-#                             in COMBINED_FEATURES.
-# REQUIRED_COMBINED_FEATURES: ensure every item on this list is included
-#                             in COMBINED_FEATURES.
-# CONFLICT_COMBINED_FEATURES: ensure no item in this list is included in
-#                             COMBINED_FEATURES.
+# xxx = [DISTRO,MACHINE,COMBINED]
+#
+# ANY_OF_xxx_FEATURES:        ensure at least one item on this list is included
+#                             in xxx_FEATURES.
+# REQUIRED_xxx_FEATURES:      ensure every item on this list is included
+#                             in xxx_FEATURES.
+# CONFLICT_xxx_FEATURES:      ensure no item in this list is included in
+#                             xxx_FEATURES.
 #
 # Copyright 2019 (C) Texas Instruments Inc.
 # Copyright 2013 (C) O.S. Systems Software LTDA.
@@ -26,63 +16,42 @@
     if d.getVar('PARSE_ALL_RECIPES', False):
         return
 
-    # Assume at least one var is set.
-    distro_features = set((d.getVar('DISTRO_FEATURES') or '').split())
+    unused = True
 
-    any_of_distro_features = set((d.getVar('ANY_OF_DISTRO_FEATURES') or '').split())
-    if any_of_distro_features:
-        if set.isdisjoint(any_of_distro_features, distro_features):
-            raise bb.parse.SkipRecipe("one of '%s' needs to be in DISTRO_FEATURES" % ' '.join(any_of_distro_features))
+    for kind in ['DISTRO', 'MACHINE', 'COMBINED']:
+        if d.getVar('ANY_OF_' + kind + '_FEATURES') is None and \
+           d.overridedata.get('ANY_OF_' + kind + '_FEATURES') is None and \
+           d.getVar('REQUIRED_' + kind + '_FEATURES') is None and \
+           d.overridedata.get('REQUIRED_' + kind + '_FEATURES') is None and \
+           d.getVar('CONFLICT_' + kind + '_FEATURES') is None and \
+           d.overridedata.get('CONFLICT_' + kind + '_FEATURES') is None:
+            continue
 
-    required_distro_features = set((d.getVar('REQUIRED_DISTRO_FEATURES') or '').split())
-    if required_distro_features:
-        missing = set.difference(required_distro_features, distro_features)
-        if missing:
-            raise bb.parse.SkipRecipe("missing required distro feature%s '%s' (not in DISTRO_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing)))
+        unused = False
 
-    conflict_distro_features = set((d.getVar('CONFLICT_DISTRO_FEATURES') or '').split())
-    if conflict_distro_features:
-        conflicts = set.intersection(conflict_distro_features, distro_features)
-        if conflicts:
-            raise bb.parse.SkipRecipe("conflicting distro feature%s '%s' (in DISTRO_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts)))
+        # Assume at least one var is set.
+        features = set((d.getVar(kind + '_FEATURES') or '').split())
 
-    # Assume at least one var is set.
-    machine_features = set((d.getVar('MACHINE_FEATURES') or '').split())
+        any_of_features = set((d.getVar('ANY_OF_' + kind + '_FEATURES') or '').split())
+        if any_of_features:
+            if set.isdisjoint(any_of_features, features):
+                raise bb.parse.SkipRecipe("one of '%s' needs to be in %s_FEATURES"
+                    % (' '.join(any_of_features), kind))
 
-    any_of_machine_features = set((d.getVar('ANY_OF_MACHINE_FEATURES') or '').split())
-    if any_of_machine_features:
-        if set.isdisjoint(any_of_machine_features, machine_features):
-            raise bb.parse.SkipRecipe("one of '%s' needs to be in MACHINE_FEATURES" % ' '.join(any_of_machine_features))
+        required_features = set((d.getVar('REQUIRED_' + kind + '_FEATURES') or '').split())
+        if required_features:
+            missing = set.difference(required_features, features)
+            if missing:
+                raise bb.parse.SkipRecipe("missing required %s feature%s '%s' (not in %s_FEATURES)"
+                    % (kind.lower(), 's' if len(missing) > 1 else '', ' '.join(missing), kind))
 
-    required_machine_features = set((d.getVar('REQUIRED_MACHINE_FEATURES') or '').split())
-    if required_machine_features:
-        missing = set.difference(required_machine_features, machine_features)
-        if missing:
-            raise bb.parse.SkipRecipe("missing required machine feature%s '%s' (not in MACHINE_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing)))
+        conflict_features = set((d.getVar('CONFLICT_' + kind + '_FEATURES') or '').split())
+        if conflict_features:
+            conflicts = set.intersection(conflict_features, features)
+            if conflicts:
+                raise bb.parse.SkipRecipe("conflicting %s feature%s '%s' (in %s_FEATURES)"
+                    % (kind.lower(), 's' if len(conflicts) > 1 else '', ' '.join(conflicts), kind))
 
-    conflict_machine_features = set((d.getVar('CONFLICT_MACHINE_FEATURES') or '').split())
-    if conflict_machine_features:
-        conflicts = set.intersection(conflict_machine_features, machine_features)
-        if conflicts:
-            raise bb.parse.SkipRecipe("conflicting machine feature%s '%s' (in MACHINE_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts)))
-
-    # Assume at least one var is set.
-    combined_features = set((d.getVar('COMBINED_FEATURES') or '').split())
-
-    any_of_combined_features = set((d.getVar('ANY_OF_COMBINED_FEATURES') or '').split())
-    if any_of_combined_features:
-        if set.isdisjoint(any_of_combined_features, combined_features):
-            raise bb.parse.SkipRecipe("one of '%s' needs to be in COMBINED_FEATURES" % ' '.join(any_of_combined_features))
-
-    required_combined_features = set((d.getVar('REQUIRED_COMBINED_FEATURES') or '').split())
-    if required_combined_features:
-        missing = set.difference(required_combined_features, combined_features)
-        if missing:
-            raise bb.parse.SkipRecipe("missing required machine feature%s '%s' (not in COMBINED_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing)))
-
-    conflict_combined_features = set((d.getVar('CONFLICT_COMBINED_FEATURES') or '').split())
-    if conflict_combined_features:
-        conflicts = set.intersection(conflict_combined_features, combined_features)
-        if conflicts:
-            raise bb.parse.SkipRecipe("conflicting machine feature%s '%s' (in COMBINED_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts)))
+    if unused:
+        bb.warn("Recipe inherits features_check but doesn't use it")
 }
