]> git.baikalelectronics.ru Git - kernel.git/commit
mm: remove more IS_ERR_VALUE abuses
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 27 May 2016 22:57:31 +0000 (15:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 27 May 2016 22:57:31 +0000 (15:57 -0700)
commit7ee4650a40d6d719d40ce445b3f4700d19746c3c
tree464a86dc3d004dd334e37a8fe7e7b42f8511581e
parent501feb20202fae065bb551ddb29c20fc0c49ad90
mm: remove more IS_ERR_VALUE abuses

The do_brk() and vm_brk() return value was "unsigned long" and returned
the starting address on success, and an error value on failure.  The
reasons are entirely historical, and go back to it basically behaving
like the mmap() interface does.

However, nobody actually wanted that interface, and it causes totally
pointless IS_ERR_VALUE() confusion.

What every single caller actually wants is just the simpler integer
return of zero for success and negative error number on failure.

So just convert to that much clearer and more common calling convention,
and get rid of all the IS_ERR_VALUE() uses wrt vm_brk().

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/ia32/ia32_aout.c
fs/binfmt_aout.c
fs/binfmt_elf.c
include/linux/mm.h
mm/mmap.c
mm/nommu.c