[9/9] x86: cpu -- Drop no longer needed early exit from cpu_validate_features

Submitted by Cyrill Gorcunov on Aug. 7, 2018, 4:35 p.m.

Details

Message ID 20180807163517.21669-10-gorcunov@gmail.com
State New
Series "x86: cpu -- Rework feature testing"
Headers show

Commit Message

Cyrill Gorcunov Aug. 7, 2018, 4:35 p.m.
Since now validation is bit based there is no longer need to
exit early if fpu matches, we rather need over all possible
options where several capability modes can be set.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 criu/arch/x86/cpu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/arch/x86/cpu.c b/criu/arch/x86/cpu.c
index 6fe6ace6a198..b57d55e9f077 100644
--- a/criu/arch/x86/cpu.c
+++ b/criu/arch/x86/cpu.c
@@ -258,8 +258,7 @@  static int cpu_validate_features(compel_cpuinfo_t *cpu_info)
 			       __mismatch_fpu_bit(X86_FEATURE_OSXSAVE),
 			       __mismatch_fpu_bit(X86_FEATURE_XSAVES));
 			return -1;
-		} else
-			return 0;
+		}
 #undef __mismatch_fpu_bit
 
 		/*

Comments

Dmitry Safonov Aug. 20, 2018, 12:33 p.m.
2018-08-07 17:35 GMT+01:00 Cyrill Gorcunov <gorcunov@gmail.com>:
> Since now validation is bit based there is no longer need to
> exit early if fpu matches, we rather need over all possible
> options where several capability modes can be set.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>

Reviewed-by: Dmitry Safonov <0x7f454c46@gmaill.com>

Thanks,
             Dmitry