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

[PATCH] xen/arm: Remove stray semicolon at VREG_REG_HELPERS/TLB_HELPER* callers


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Wed, 14 Jun 2023 11:41:44 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Crafoo9/Nm8L4EYypZqARlLJBQsdUK+S4879SL0mCl4=; b=ogp5EAUNF5Bd9nqB0nMjQz+UNX/N20hLahiFu3fDR+G0v3uoht9LbZgJd9l+aMHFofb+maYJ6pjpFzuw5gmUAQp4FQo3wV5FgmdhMW0iyDOrjdsH8HeAd8puVJsycOLUEpOvPAB3EkTTE8EbLUy76Pjpa0VavfICwjXDnx7Owe5i+l6kwp1fSA5BMf8Ej1ZaToE9H37mrZtmBVuomXECZjY/IZn+azOCQL3RUKVaUxuRHhKJjeKqpP1TtxpG2ySmThOppHkeTghLQyBOyif2L3w3mwUpSg3nmvIIiH++Et+pU83fmvEPYSOE+phctnGFQO9dLK9Ru4PuPx3eC6fzfQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ilboJ2YFvkF02hZHtohrwZ3K+7tD645Fwt5H5ifJmA/91Sa1+DjlXG8K68eRQy7e24IYXNNTHXO9dE5AnbDWRu7XHywXgzjnKh0owJfNXRo3f3IPxuBEXzmYT8gDiADlyHlyFegzr2hteNkokxGtWbd/DaGgIeCWyN6M9Tf+Q8mOBr+5d9o8hhEENifneYN5H7M+A1YIe5hpSdKqX0Yl3k4Iq64GdeD/gklBLsrpFzG/2JD+hz6H/E/LJUX6meE+07zguqjaJQg0L+ukoxDe4OZ3WHLMFb5srGJLgPJEyexNUKdPnuXtPdC1Kq3FB30UP5GC3myc0HWm3SCHTOZDVg==
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 14 Jun 2023 09:42:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This is inconsistent with the rest of the code where macros are used
to define functions, as it results in an empty declaration (i.e.
semicolon with nothing before it) after function definition. This is also
not allowed by C99.

Take the opportunity to undefine TLB_HELPER* macros after last use.

Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
Discussion:
https://lore.kernel.org/xen-devel/17C59D5C-795E-4591-A7C9-A4C5179BF373@xxxxxxx/

Other empty declarations appear at callers of TYPE_SAFE and Linux module
macros like EXPORT_SYMBOL for which we need some sort of agreement.
---
 xen/arch/arm/include/asm/arm32/flushtlb.h | 12 +++++++-----
 xen/arch/arm/include/asm/arm64/flushtlb.h | 17 ++++++++++-------
 xen/arch/arm/include/asm/vreg.h           |  4 ++--
 3 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/xen/arch/arm/include/asm/arm32/flushtlb.h 
b/xen/arch/arm/include/asm/arm32/flushtlb.h
index 7ae6a12f8155..22ee3b317b4d 100644
--- a/xen/arch/arm/include/asm/arm32/flushtlb.h
+++ b/xen/arch/arm/include/asm/arm32/flushtlb.h
@@ -29,19 +29,21 @@ static inline void name(void)       \
 }
 
 /* Flush local TLBs, current VMID only */
-TLB_HELPER(flush_guest_tlb_local, TLBIALL, nsh);
+TLB_HELPER(flush_guest_tlb_local, TLBIALL, nsh)
 
 /* Flush inner shareable TLBs, current VMID only */
-TLB_HELPER(flush_guest_tlb, TLBIALLIS, ish);
+TLB_HELPER(flush_guest_tlb, TLBIALLIS, ish)
 
 /* Flush local TLBs, all VMIDs, non-hypervisor mode */
-TLB_HELPER(flush_all_guests_tlb_local, TLBIALLNSNH, nsh);
+TLB_HELPER(flush_all_guests_tlb_local, TLBIALLNSNH, nsh)
 
 /* Flush innershareable TLBs, all VMIDs, non-hypervisor mode */
-TLB_HELPER(flush_all_guests_tlb, TLBIALLNSNHIS, ish);
+TLB_HELPER(flush_all_guests_tlb, TLBIALLNSNHIS, ish)
 
 /* Flush all hypervisor mappings from the TLB of the local processor. */
-TLB_HELPER(flush_xen_tlb_local, TLBIALLH, nsh);
+TLB_HELPER(flush_xen_tlb_local, TLBIALLH, nsh)
+
+#undef TLB_HELPER
 
 /* Flush TLB of local processor for address va. */
 static inline void __flush_xen_tlb_one_local(vaddr_t va)
diff --git a/xen/arch/arm/include/asm/arm64/flushtlb.h 
b/xen/arch/arm/include/asm/arm64/flushtlb.h
index 3a9092b814a9..56c6fc763b56 100644
--- a/xen/arch/arm/include/asm/arm64/flushtlb.h
+++ b/xen/arch/arm/include/asm/arm64/flushtlb.h
@@ -67,25 +67,28 @@ static inline void name(vaddr_t va)              \
 }
 
 /* Flush local TLBs, current VMID only. */
-TLB_HELPER(flush_guest_tlb_local, vmalls12e1, nsh);
+TLB_HELPER(flush_guest_tlb_local, vmalls12e1, nsh)
 
 /* Flush innershareable TLBs, current VMID only */
-TLB_HELPER(flush_guest_tlb, vmalls12e1is, ish);
+TLB_HELPER(flush_guest_tlb, vmalls12e1is, ish)
 
 /* Flush local TLBs, all VMIDs, non-hypervisor mode */
-TLB_HELPER(flush_all_guests_tlb_local, alle1, nsh);
+TLB_HELPER(flush_all_guests_tlb_local, alle1, nsh)
 
 /* Flush innershareable TLBs, all VMIDs, non-hypervisor mode */
-TLB_HELPER(flush_all_guests_tlb, alle1is, ish);
+TLB_HELPER(flush_all_guests_tlb, alle1is, ish)
 
 /* Flush all hypervisor mappings from the TLB of the local processor. */
-TLB_HELPER(flush_xen_tlb_local, alle2, nsh);
+TLB_HELPER(flush_xen_tlb_local, alle2, nsh)
 
 /* Flush TLB of local processor for address va. */
-TLB_HELPER_VA(__flush_xen_tlb_one_local, vae2);
+TLB_HELPER_VA(__flush_xen_tlb_one_local, vae2)
 
 /* Flush TLB of all processors in the inner-shareable domain for address va. */
-TLB_HELPER_VA(__flush_xen_tlb_one, vae2is);
+TLB_HELPER_VA(__flush_xen_tlb_one, vae2is)
+
+#undef TLB_HELPER
+#undef TLB_HELPER_VA
 
 #endif /* __ASM_ARM_ARM64_FLUSHTLB_H__ */
 /*
diff --git a/xen/arch/arm/include/asm/vreg.h b/xen/arch/arm/include/asm/vreg.h
index d92450017bc4..bf945eebbde4 100644
--- a/xen/arch/arm/include/asm/vreg.h
+++ b/xen/arch/arm/include/asm/vreg.h
@@ -140,8 +140,8 @@ static inline void vreg_reg##sz##_clearbits(uint##sz##_t 
*reg,          \
     *reg &= ~(((uint##sz##_t)bits & mask) << shift);                    \
 }
 
-VREG_REG_HELPERS(64, 0x7);
-VREG_REG_HELPERS(32, 0x3);
+VREG_REG_HELPERS(64, 0x7)
+VREG_REG_HELPERS(32, 0x3)
 
 #undef VREG_REG_HELPERS
 

base-commit: 2f69ef96801f0d2b9646abf6396e60f99c56e3a0
-- 
2.25.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.