]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/xen: Use DIV_ROUND_UP
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Wed, 29 Jun 2016 15:00:38 +0000 (20:30 +0530)
committerBob Liu <bob.liu@oracle.com>
Thu, 20 Oct 2016 07:57:45 +0000 (03:57 -0400)
commitd73f48d56b4f0428ff947a4a0b0be01b3d515825
tree0f9f44c7b175b3705a3014d0fac1041a1c9784a3
parent6104257332d87fb9976cb7013bd14b3e87a70f49
x86/xen: Use DIV_ROUND_UP

The kernel.h macro DIV_ROUND_UP performs the computation
(((n) + (d) - 1) /(d)) but is perhaps more readable.

The Coccinelle script used to make this change is as follows:
@haskernel@
@@

@depends on haskernel@
expression n,d;
@@

(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
(cherry picked from commit 585423c8c4d2f39a2c299bc6dd16433e6141fba5)
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Orabug: 24820937
arch/x86/xen/enlighten.c