]> git.baikalelectronics.ru Git - kernel.git/commit
mm/page_alloc.c: micro-optimisation Remove unnecessary branch
authorMateusz Nosek <mateusznosek0@gmail.com>
Thu, 2 Apr 2020 04:09:53 +0000 (21:09 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 2 Apr 2020 16:35:31 +0000 (09:35 -0700)
commit144a898b9e6924c8f3415d71571b6ab13f440b6f
treeb5b8c84ba784be99712ffc219fbbac970b8406b5
parent8e27076a04ab18fb2d3a7171460e81d0b18d6ba9
mm/page_alloc.c: micro-optimisation Remove unnecessary branch

Previously if branch condition was false, the assignment was not executed.
The assignment can be safely executed even when the condition is false
and it is not incorrect as it assigns the value of 'nodemask' to
'ac.nodemask' which already has the same value.

So as the assignment can be executed unconditionally, the branch can be
removed.

Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: http://lkml.kernel.org/r/20200307225335.31300-1-mateusznosek0@gmail.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c