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 */
                break;

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

Regards

David Binderman

                                          
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to