From: Oleg Nesterov Date: Thu, 9 Oct 2014 22:25:36 +0000 (-0700) Subject: fs/proc/task_mmu.c: simplify m_start() to make it readable X-Git-Tag: fixes-against-v3.18-rc2~137^2~132 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c255321f879c36bd74f58f9c7ed235ea6b919cb;p=pandora-kernel.git fs/proc/task_mmu.c: simplify m_start() to make it readable Now that m->version is gone we can cleanup m_start(). In particular, - Remove the "unsigned long" typecast, m->index can't be negative or exceed ->map_count. But lets use "unsigned int pos" to make it clear that "pos < map_count" is safe. - Remove the unnecessary "vma != NULL" check in the main loop. It can't be NULL unless we have a vm bug. - This also means that "pos < map_count" case can simply return the valid vma and avoid "goto" and subsequent checks. Signed-off-by: Oleg Nesterov Cc: Kirill A. Shutemov Cc: Cyrill Gorcunov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed