Bug 81651

Summary: mm/memory.c:3608: possible cut'n'paste error ?
Product: Memory Management Reporter: David Binderman (dcb314)
Component: OtherAssignee: Andrew Morton (akpm)
Status: RESOLVED INVALID    
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 11:46:58 UTC
[linux-3.16/mm/memory.c:3608]: (style) Statements following return, break, continue, goto or throw will never be executed.

Source code is

            if (ret <= 0)
#endif
                break;
            bytes = ret;
Comment 1 Andrey Utkin 2014-08-04 19:38:33 UTC
This is not necessarily an error. Not the most simple code to comprehend, too, though.
I didn't investigate deeply the meaning of code, but the code makes sense with with and without CONFIG_HAVE_IOREMAP_PROT being defined. The code and those #ifdef/#endif lines were added in single commit, and that commit is not huge, so it is well-thought I hope.