There is a block of if tests against the same variable
in include/linux/mtd/pfow.h that likely is defective

        if (prog_status & 0x3)
                ...
        else if (prog_status & 0x2)
                ...
        else (prog_status & 0x1)
                ...

If the first test is true the subsequent 2 tests aren't
possible.

Likely the first test should be something like

        if ((prog_status & 0x03) == 0x03)

Is there a way for cocci to find this style of bitwise
logic defect?



_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to