On 29/06/16 16:00, Amitoj Kaur Chawla wrote:
> 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@
> @@
>
> #include
>
> @depends on haskernel@
> expressio
On 29/06/16 17:34, Jan Beulich wrote:
On 29.06.16 at 17:00, wrote:
>> --- a/arch/x86/xen/enlighten.c
>> +++ b/arch/x86/xen/enlighten.c
>> @@ -591,7 +591,7 @@ static void xen_load_gdt(const struct desc_ptr *dtr)
>> {
>> unsigned long va = dtr->address;
>> unsigned int size = dtr->si
>>> On 29.06.16 at 17:00, wrote:
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -591,7 +591,7 @@ static void xen_load_gdt(const struct desc_ptr *dtr)
> {
> unsigned long va = dtr->address;
> unsigned int size = dtr->size + 1;
> - unsigned pages = (size + PA
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@
@@
#include
@depends on haskernel@
expression n,d;
@@
(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)