linux-2.6.36-rc3 bug report

d binderman dcb314 at
Wed Sep 8 05:00:44 EST 2010

Hello there,

I just tried out cppcheck-1.44 on the linux-2.6.36-rc3 source code.

It said

Checking arch/powerpc/kernel/ppc970-pmu.c...
[arch/powerpc/kernel/ppc970-pmu.c:171]: (style) Redundant assignment of "mask" in switch

The source code is

        case PM_VPU:
                mask = 0x4c;            /* byte 0 bits 2,3,6 */
        case PM_LSU0:
                /* byte 2 bits 0,2,3,4,6; all of byte 1 */
                mask = 0x085dff00;
        case PM_LSU1L:
                mask = 0x50 << 24;      /* byte 3 bits 4,6 */

It looks to me like a missing break on the first and second cases.
Suggest code rework.


David Binderman


More information about the Linuxppc-dev mailing list