x86, MCE: eliminate the strange combination of return and break
PATCH 1/1 x86, MCE: eliminate the strange combination of return and break
What do you feel when you see the code snippet like that shown below?
switch (c) {
case X:
... ...
return 1;
break;
case Y:
... ...
return 1;
break;
}All in all, in many ways I'm not feeling well. I think a small change is needed here. This patch aims to eliminate the strange combination of *return* and *break* in the above switch-statement.
Signed-off-by Chen Yucong <[email protected]>
--- arch/x86/kernel/cpu/mcheck/mce.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/kernel/cpu/mcheck/mce.c +3 -3
@@ -1618,15 +1618,15 @@ static int __mcheck_cpu_ancient_init(struct cpuinfo_x86 *c)switch (c->x86_vendor) {case X86_VENDOR_INTEL :intel_p5_mcheck_init (c); -return 1 ;break ;case X86_VENDOR_CENTAUR :winchip_mcheck_init (c); -return 1 ;break ; +default : +return 0 ; } -return 0 ; +return 1 ; }static void __mcheck_cpu_init_vendor (struct cpuinfo_x86 *c)
Signature · 1 line
1.7.10.4