]> git.baikalelectronics.ru Git - kernel.git/commit
mm/memblock.c: remove unnecessary always-true comparison
authorRichard Leitner <dev@g0hl1n.net>
Fri, 20 May 2016 23:58:33 +0000 (16:58 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 21 May 2016 00:58:30 +0000 (17:58 -0700)
commit418fc88ea4bea3a445bbd869cb8716f5c089f1fc
treeec001711de1e1490cf2bfd289cfe627f9fd4ca0b
parent1fb65f392aba822de6fc2c5980f6e1364a92d1e2
mm/memblock.c: remove unnecessary always-true comparison

Comparing an u64 variable to >= 0 returns always true and can therefore
be removed.  This issue was detected using the -Wtype-limits gcc flag.

This patch fixes following type-limits warning:

  mm/memblock.c: In function `__next_reserved_mem_region':
  mm/memblock.c:843:11: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
    if (*idx >= 0 && *idx < type->cnt) {

Link: http://lkml.kernel.org/r/20160510103625.3a7f8f32@g0hl1n.net
Signed-off-by: Richard Leitner <dev@g0hl1n.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memblock.c