Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm/memblock: return true directly on finding overlap region

Not necessary to break and check i against type->cnt again.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Link: https://lore.kernel.org/r/20240507075833.6346-6-richard.weiyang@gmail.com
Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org>

authored by

Wei Yang and committed by
Mike Rapoport (IBM)
1eb0a28d 1a879671

+2 -2
+2 -2
mm/memblock.c
··· 194 194 for (i = 0; i < type->cnt; i++) 195 195 if (memblock_addrs_overlap(base, size, type->regions[i].base, 196 196 type->regions[i].size)) 197 - break; 198 - return i < type->cnt; 197 + return true; 198 + return false; 199 199 } 200 200 201 201 /**