Bug 81631 - powerpc/mm/numa.c:615: statements in wrong order ?
Summary: powerpc/mm/numa.c:615: statements in wrong order ?
Status: RESOLVED CODE_FIX
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: PPC-32 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: platform_ppc-32
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-04 08:40 UTC by David Binderman
Modified: 2014-08-21 18:50 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.16
Subsystem:
Regression: No
Bisected commit-id:


Attachments

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"

Note You need to log in before you can comment on or make changes to this bug.