[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 5/9] elf2dmp: Rename PAGE_SIZE to ELF2DMP_PAGE_SIZE
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 5/9] elf2dmp: Rename PAGE_SIZE to ELF2DMP_PAGE_SIZE |
Date: |
Mon, 18 Jan 2021 10:44:39 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 1/18/21 7:38 AM, Jiaxun Yang wrote:
> As per POSIX specification of limits.h [1], OS libc may define
> PAGE_SIZE in limits.h.
>
> To prevent collosion of definition, we rename PAGE_SIZE here.
>
> [1]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html
>
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> ---
> contrib/elf2dmp/addrspace.h | 6 +++---
> contrib/elf2dmp/addrspace.c | 4 ++--
> contrib/elf2dmp/main.c | 18 +++++++++---------
> 3 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/contrib/elf2dmp/addrspace.h b/contrib/elf2dmp/addrspace.h
> index d87f6a18c6..00b44c1218 100644
> --- a/contrib/elf2dmp/addrspace.h
> +++ b/contrib/elf2dmp/addrspace.h
> @@ -10,9 +10,9 @@
>
> #include "qemu_elf.h"
>
> -#define PAGE_BITS 12
> -#define PAGE_SIZE (1ULL << PAGE_BITS)
> -#define PFN_MASK (~(PAGE_SIZE - 1))
> +#define ELF2DMP_PAGE_BITS 12
> +#define ELF2DMP_PAGE_SIZE (1ULL << ELF2DMP_PAGE_BITS)
> +#define ELF2DMP_PFN_MASK (~(ELF2DMP_PAGE_SIZE - 1))
Here you renamed all definitions, better.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
- [PATCH v2 0/9] Alpine Linux build fix and CI pipeline, Jiaxun Yang, 2021/01/18
- [PATCH v2 1/9] configure: Add sys/timex.h to probe clock_adjtime, Jiaxun Yang, 2021/01/18
- [PATCH v2 2/9] libvhost-user: Include poll.h instead of sys/poll.h, Jiaxun Yang, 2021/01/18
- [PATCH v2 3/9] osdep.h: Remove <sys/signal.h> include, Jiaxun Yang, 2021/01/18
- [PATCH v2 4/9] hw/block/nand: Rename PAGE_SIZE to NAND_PAGE_SIZE, Jiaxun Yang, 2021/01/18
- [PATCH v2 5/9] elf2dmp: Rename PAGE_SIZE to ELF2DMP_PAGE_SIZE, Jiaxun Yang, 2021/01/18
- Re: [PATCH v2 5/9] elf2dmp: Rename PAGE_SIZE to ELF2DMP_PAGE_SIZE,
Philippe Mathieu-Daudé <=
- [PATCH v2 8/9] tests/docker: Add dockerfile for Alpine Linux, Jiaxun Yang, 2021/01/18
- Re: [PATCH v2 8/9] tests/docker: Add dockerfile for Alpine Linux, Daniel P . Berrangé, 2021/01/18
- Re: [PATCH v2 8/9] tests/docker: Add dockerfile for Alpine Linux, Thomas Huth, 2021/01/19
- Re: [PATCH v2 8/9] tests/docker: Add dockerfile for Alpine Linux, Daniel P . Berrangé, 2021/01/19
- Re: [PATCH v2 8/9] tests/docker: Add dockerfile for Alpine Linux, John Snow, 2021/01/26
- Re: [PATCH v2 8/9] tests/docker: Add dockerfile for Alpine Linux, Daniel P . Berrangé, 2021/01/27
- Re: [PATCH v2 8/9] tests/docker: Add dockerfile for Alpine Linux, John Snow, 2021/01/27
[PATCH v2 6/9] tests: Rename PAGE_SIZE definitions, Jiaxun Yang, 2021/01/18
[PATCH v2 7/9] accel/kvm: avoid using predefined PAGE_SIZE, Jiaxun Yang, 2021/01/18