mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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/[email protected]
Signed-off-by: Richard Leitner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
9a001fc19c
commit
cd33a76b0f
1 changed files with 1 additions and 1 deletions
|
|
@ -824,7 +824,7 @@ void __init_memblock __next_reserved_mem_region(u64 *idx,
|
|||
{
|
||||
struct memblock_type *type = &memblock.reserved;
|
||||
|
||||
if (*idx >= 0 && *idx < type->cnt) {
|
||||
if (*idx < type->cnt) {
|
||||
struct memblock_region *r = &type->regions[*idx];
|
||||
phys_addr_t base = r->base;
|
||||
phys_addr_t size = r->size;
|
||||
|
|
|
|||
Loading…
Reference in a new issue