remove unnecessary check code for hole_align
Subsystems (2)
PATCH 1/1 remove unnecessary check code for hole_align
hole_align == 0 check is not neccesary, because it will be set to pagesize if it's zero. Just remove it here.
--- kexec/kexec.c | 4 ---- 1 file changed, 4 deletions(-)
kexec/kexec.c +0 -4
@@ -203,10 +203,6 @@ unsigned long locate_hole(struct kexec_i/* Set an intial invalid value for the hole base */ hole_base =ULONG_MAX ; -/* Ensure I have a sane alignment value */ -if (hole_align ==0 ) { - hole_align =1 ; - }/* Align everything to at least a page size boundary */ if (hole_align < (unsigned long )getpagesize ()) { hole_align =getpagesize ();
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 3 lines · Dave Young
hole_align== 0 check is not neccesary, because it will be set to pagesize if it's zero. Just remove it here.
Hi Dave,
it looks like the if condition can never be true due to hole_base being set to a non-zero value on the previous line.
Which is a long way of saying, I like your patch.
Quoted 21 lines
Signed-off-by Dave Young <[email protected]>--- kexec/kexec.c | 4 ---- 1 file changed, 4 deletions(-)Index:
kexec-tools/kexec/kexec.c
===================================================================kexec/kexec.c +0
-4@@ -203,10 +203,6 @@ unsigned long locate_hole(struct kexec_i/* Set an intial invalid value for the hole base */ hole_base =ULONG_MAX ; -/* Ensure I have a sane alignment value */ -if (hole_align ==0 ) { - hole_align =1 ; - }/* Align everything to at least a page size boundary */ if (hole_align < (unsigned long )getpagesize ()) { hole_align =getpagesize ();
Quoted 5 lines
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 5 lines · Simon Horman
Quoted 3 lines · Dave Young
hole_align== 0 check is not neccesary, because it will be set to pagesize if it's zero. Just remove it here.
Quoted 7 lines
Hi Dave,
it looks like the if condition can never be true due to
hole_basebeing set to a non-zero value on the previous line.Which is a long way of saying, I like your patch.
Hi Dave,
I have applied your patch to my kexec-tools tree on github.
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec