BUG_ON() Conversion in mm/memory.c
Subsystems (3)
PATCH 2/7 BUG_ON() Conversion in mm/memory.c
hi,
this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away.
Signed-off-by Eric Sesterhenn <[email protected]>
mm/memory.c renamed from mm/memory.c.orig +2 -4
@@ -2339,10 +2339,8 @@ int make_pages_present(unsigned long addif (!vma)return -1 ; write = (vma->vm_flags &VM_WRITE ) !=0 ; -if (addr >= end) -BUG (); -if (end > vma->vm_end) -BUG (); +BUG_ON (addr >= end); +BUG_ON (end > vma->vm_end); len = (end+PAGE_SIZE -1 )/PAGE_SIZE -addr/PAGE_SIZE ; ret =get_user_pages (current, current->mm, addr, len, write,0 ,NULL ,NULL );
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors