From: Nadav Amit <nadav.amit@gmail.com>
To: Claudio Imbrenda <imbrenda@linux.ibm.com>,
Sean Christopherson <sean.j.christopherson@intel.com>
Cc: kvm <kvm@vger.kernel.org>, Paolo Bonzini <pbonzini@redhat.com>,
frankja@linux.ibm.com, Thomas Huth <thuth@redhat.com>,
David Hildenbrand <david@redhat.com>,
drjones@redhat.com, Jim Mattson <jmattson@google.com>
Subject: Re: [kvm-unit-tests PATCH v2 2/2] lib/alloc_page: Fix compilation issue on 32bit archs
Date: Thu, 16 Jul 2020 00:11:31 -0700 [thread overview]
Message-ID: <7F765FA6-FC63-4D82-BB13-00EF133CB031@gmail.com> (raw)
In-Reply-To: <20200714130030.56037-3-imbrenda@linux.ibm.com>
> On Jul 14, 2020, at 6:00 AM, Claudio Imbrenda <imbrenda@linux.ibm.com> wrote:
>
> The assert in lib/alloc_page is hardcoded to long.
>
> Use the z modifier instead, which is meant to be used for size_t.
>
> Fixes: 73f4b202beb39 ("lib/alloc_page: change some parameter types")
> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
> ---
> lib/alloc_page.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/alloc_page.c b/lib/alloc_page.c
> index fa3c527..74fe726 100644
> --- a/lib/alloc_page.c
> +++ b/lib/alloc_page.c
> @@ -29,11 +29,11 @@ void free_pages(void *mem, size_t size)
> assert_msg((unsigned long) mem % PAGE_SIZE == 0,
> "mem not page aligned: %p", mem);
>
> - assert_msg(size % PAGE_SIZE == 0, "size not page aligned: %#lx", size);
> + assert_msg(size % PAGE_SIZE == 0, "size not page aligned: %#zx", size);
>
> assert_msg(size == 0 || (uintptr_t)mem == -size ||
> (uintptr_t)mem + size > (uintptr_t)mem,
> - "mem + size overflow: %p + %#lx", mem, size);
> + "mem + size overflow: %p + %#zx", mem, size);
>
> if (size == 0) {
> freelist = NULL;
> —
> 2.26.2
Sean sent a different patch ("lib/alloc_page: Revert to 'unsigned long’ for
@size params”) that changes size to unsigned long, so you really should
synchronize.
next prev parent reply other threads:[~2020-07-16 7:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-14 13:00 [kvm-unit-tests PATCH v2 0/2] Fix some compilation issues on 32bit Claudio Imbrenda
2020-07-14 13:00 ` [kvm-unit-tests PATCH v2 1/2] x86/cstart: Fix compilation issue in 32 bit mode Claudio Imbrenda
2020-07-15 14:29 ` Claudio Imbrenda
2020-07-14 13:00 ` [kvm-unit-tests PATCH v2 2/2] lib/alloc_page: Fix compilation issue on 32bit archs Claudio Imbrenda
2020-07-15 14:19 ` Thomas Huth
2020-07-16 7:11 ` Nadav Amit [this message]
2020-07-16 9:55 ` Claudio Imbrenda
2020-07-28 21:25 ` [kvm-unit-tests PATCH v2 0/2] Fix some compilation issues on 32bit Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7F765FA6-FC63-4D82-BB13-00EF133CB031@gmail.com \
--to=nadav.amit@gmail.com \
--cc=david@redhat.com \
--cc=drjones@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.