Re: [kvm-unit-tests PATCH] lib/alloc_page: Revert to 'unsigned long' for @size params

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 13, 2020 at 09:20:46PM -0700, Sean Christopherson wrote:
> Revert to using 'unsigned long' instead of 'size_t' for free_pages() and
> get_order().  The recent change to size_t for free_pages() breaks i386
> with -Werror as the assert_msg() formats expect unsigned longs, whereas
> size_t is an 'unsigned int' on i386 (though both longs and ints are 4
> bytes).
> 
> Message formatting aside, unsigned long is the correct choice given the
> current code base as alloc_pages() and free_pages_by_order() explicitly
> expect, work on, and/or assert on the size being an unsigned long.
> 
> Fixes: 73f4b202beb39 ("lib/alloc_page: change some parameter types")
> Cc: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
> Cc: Andrew Jones <drjones@xxxxxxxxxx>
> Cc: Jim Mattson <jmattson@xxxxxxxxxx>
> Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
> ---
>  lib/alloc_page.c | 2 +-
>  lib/alloc_page.h | 2 +-
>  lib/bitops.h     | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>

Fixes compilation on arm32.

Reviewed-by: Andrew Jones <drjones@xxxxxxxxxx>




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux