Bug 81641

Summary: sparc/math-emu/math_32.c:503: statement order wierdness ?
Product: Platform Specific/Hardware Reporter: David Binderman (dcb314)
Component: SPARC32Assignee: Pete Zaitcev (zaitcev)
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:44:49 UTC
[linux-3.16/arch/sparc/math-emu/math_32.c:503]: (style) Statements following return, break, continue, goto or throw will never be executed.

        case 0: fsr = *pfsr;
            if (IR == -1) IR = 2;
            /* fcc is always fcc0 */
            fsr &= ~0xc00; fsr |= (IR << 10); break;
            *pfsr = fsr;
            break;

Maybe better

        case 0: fsr = *pfsr;
            if (IR == -1) IR = 2;
            /* fcc is always fcc0 */
            fsr &= ~0xc00; fsr |= (IR << 10);
            *pfsr = fsr;
            break;
Comment 1 Andrey Utkin 2014-08-04 19:47:03 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:51:01 UTC
Thanks, patch sent, see "[PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator"