Message ID | 20250115150339.53931-1-andrew.cooper3@citrix.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | xen/ppc: Fix double xen_ulong_t typedef in public/arch-ppc.h | expand |
On 15.01.2025 16:03, Andrew Cooper wrote: > public/arch-ppc.h contains two adjacent #ifndef __ASSEMBLY__ blocks. > > With these merged, it becomes very obvious that there's a duplicate > definition of xen_ulong_t, which is also noticed by the docs build: > > /usr/bin/perl -w /local/xen.git/docs/xen-headers -O html/hypercall/ppc \ > -T 'arch-ppc - Xen public headers' \ > -X arch-arm -X arch-riscv -X arch-x86_32 -X arch-x86_64 \ > -X xen-arm -X xen-riscv -X xen-x86_32 -X xen-x86_64 \ > -X arch-x86 \ > /local/xen.git/docs/../xen include/public include/xen/errno.h > include/public/memory.h:63: multiple definitions of Typedef xen_ulong_t: include/public/arch-ppc.h:55 > include/public/memory.h:63: multiple definitions of Typedef xen_ulong_t: include/public/arch-ppc.h:61 > include/public/memory.h:63: multiple definitions of Typedef xen_ulong_t: include/public/arch-ppc.h:61 > include/public/memory.h:63: multiple definitions of Typedef xen_ulong_t: include/public/arch-ppc.h:55 > > Drop the second typedef. Finally, annotate the #endif so it's clear > what it refers to. > > Fixes: 08c192cc1127 ("xen/ppc: Add public/arch-ppc.h") > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
Hi Andrew, On 1/15/25 9:03 AM, Andrew Cooper wrote: > public/arch-ppc.h contains two adjacent #ifndef __ASSEMBLY__ blocks. > > With these merged, it becomes very obvious that there's a duplicate > definition of xen_ulong_t, which is also noticed by the docs build: > > /usr/bin/perl -w /local/xen.git/docs/xen-headers -O html/hypercall/ppc \ > -T 'arch-ppc - Xen public headers' \ > -X arch-arm -X arch-riscv -X arch-x86_32 -X arch-x86_64 \ > -X xen-arm -X xen-riscv -X xen-x86_32 -X xen-x86_64 \ > -X arch-x86 \ > /local/xen.git/docs/../xen include/public include/xen/errno.h > include/public/memory.h:63: multiple definitions of Typedef xen_ulong_t: include/public/arch-ppc.h:55 > include/public/memory.h:63: multiple definitions of Typedef xen_ulong_t: include/public/arch-ppc.h:61 > include/public/memory.h:63: multiple definitions of Typedef xen_ulong_t: include/public/arch-ppc.h:61 > include/public/memory.h:63: multiple definitions of Typedef xen_ulong_t: include/public/arch-ppc.h:55 > > Drop the second typedef. Finally, annotate the #endif so it's clear > what it refers to. > > Fixes: 08c192cc1127 ("xen/ppc: Add public/arch-ppc.h") > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Shawn Anastasio <sanastasio@raptorengineering.com> Thanks, Shawn
diff --git a/xen/include/public/arch-ppc.h b/xen/include/public/arch-ppc.h index 33a24e379551..4ca453a2841e 100644 --- a/xen/include/public/arch-ppc.h +++ b/xen/include/public/arch-ppc.h @@ -54,11 +54,6 @@ typedef uint64_t xen_pfn_t; typedef uint64_t xen_ulong_t; #define PRI_xen_ulong PRIx64 -#endif - -#ifndef __ASSEMBLY__ - -typedef uint64_t xen_ulong_t; /* * User-accessible registers: most of these need to be saved/restored @@ -107,6 +102,6 @@ struct xen_arch_domainconfig { typedef struct xen_pmu_arch { uint8_t dummy; } xen_pmu_arch_t; -#endif +#endif /* !__ASSEMBLY__ */ #endif /* __XEN_PUBLIC_ARCH_PPC_H__ */
public/arch-ppc.h contains two adjacent #ifndef __ASSEMBLY__ blocks. With these merged, it becomes very obvious that there's a duplicate definition of xen_ulong_t, which is also noticed by the docs build: /usr/bin/perl -w /local/xen.git/docs/xen-headers -O html/hypercall/ppc \ -T 'arch-ppc - Xen public headers' \ -X arch-arm -X arch-riscv -X arch-x86_32 -X arch-x86_64 \ -X xen-arm -X xen-riscv -X xen-x86_32 -X xen-x86_64 \ -X arch-x86 \ /local/xen.git/docs/../xen include/public include/xen/errno.h include/public/memory.h:63: multiple definitions of Typedef xen_ulong_t: include/public/arch-ppc.h:55 include/public/memory.h:63: multiple definitions of Typedef xen_ulong_t: include/public/arch-ppc.h:61 include/public/memory.h:63: multiple definitions of Typedef xen_ulong_t: include/public/arch-ppc.h:61 include/public/memory.h:63: multiple definitions of Typedef xen_ulong_t: include/public/arch-ppc.h:55 Drop the second typedef. Finally, annotate the #endif so it's clear what it refers to. Fixes: 08c192cc1127 ("xen/ppc: Add public/arch-ppc.h") Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> --- CC: Shawn Anastasio <sanastasio@raptorengineering.com> CC: Anthony PERARD <anthony.perard@vates.tech> CC: Michal Orzel <michal.orzel@amd.com> CC: Jan Beulich <jbeulich@suse.com> CC: Julien Grall <julien@xen.org> CC: "Roger Pau Monné" <roger.pau@citrix.com> CC: Stefano Stabellini <sstabellini@kernel.org> --- xen/include/public/arch-ppc.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)