Bug 81631

Summary: powerpc/mm/numa.c:615: statements in wrong order ?
Product: Platform Specific/Hardware Reporter: David Binderman (dcb314)
Component: PPC-32Assignee: platform_ppc-32
Status: RESOLVED CODE_FIX    
Severity: normal CC: alan, andrey_utkin
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.16 Subsystem:
Regression: No Bisected commit-id:

Description David Binderman 2014-08-04 08:40:35 UTC
[linux-3.16/arch/powerpc/mm/numa.c:615]: (style) Statements following return, break, continue, goto or throw will never be executed.

#ifdef CONFIG_HOTPLUG_CPU
    case CPU_DEAD:
    case CPU_DEAD_FROZEN:
    case CPU_UP_CANCELED:
    case CPU_UP_CANCELED_FROZEN:
        unmap_cpu_from_node(lcpu);
        break;
        ret = NOTIFY_OK;
#endif

Maybe better

#ifdef CONFIG_HOTPLUG_CPU
    case CPU_DEAD:
    case CPU_DEAD_FROZEN:
    case CPU_UP_CANCELED:
    case CPU_UP_CANCELED_FROZEN:
        unmap_cpu_from_node(lcpu);
        ret = NOTIFY_OK;
        break;
#endif
Comment 1 Andrey Utkin 2014-08-04 19:47:11 UTC
This piece of code was unchanged since 2.6.12-rc2, which was initial git commit.
However, the code is clearly weird.
Comment 2 Andrey Utkin 2014-08-04 20:23:25 UTC
Thanks, patch sent, see "[PATCH] arch/powerpc/mm/numa.c: Fix break placement"