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

[Xen-devel] [PATCH] x86/mem_sharing: Fix RANDCONFIG build

  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 7 Jan 2020 13:49:43 +0000
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@xxxxxxxxxx; spf=Pass smtp.mailfrom=Andrew.Cooper3@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
  • Delivery-date: Tue, 07 Jan 2020 13:49:51 +0000
  • Ironport-sdr: KIEKqkSMqZyUDa7B871gG4aglr03em1yKrH0e+l43HrNCHQTsRnhlvC83pQSYaphtK1TChMcqw 7nrmgHJxIN63x5Xp0FDsMLU31/Hyy6oPyBkEI8QSqAS0KRyuQIMHcA8EOeD66bsp3d+Ir5xq2x pqGBLmPC4F063ByUFhYh9Bj4n/FVA9QFVYz6aHx2dEJhCarpp1aWOJbdBCAGME5AVOVrrGI13z MBA5nfEx7q3ZJrARSnQvOdMwZT+yAnpq7RLzid/3vRawZlNMImUhrgWtBCaju+Uq5HdbA9rv1W 7AY=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Travis reports: https://travis-ci.org/andyhhp/xen/jobs/633751811

  mem_sharing.c:361:13: error: 'rmap_has_entries' defined but not used 
   static bool rmap_has_entries(const struct page_info *page)
  cc1: all warnings being treated as errors

This happens in a release build (disables MEM_SHARING_AUDIT) when

Mark the helper as maybe_unused.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>

The alternative is to delete the helper and opencode it for its one caller.
 xen/arch/x86/mm/mem_sharing.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c
index ddf1f0f9f9..0a1550ffd2 100644
--- a/xen/arch/x86/mm/mem_sharing.c
+++ b/xen/arch/x86/mm/mem_sharing.c
@@ -358,7 +358,7 @@ static bool rmap_has_one_entry(const struct page_info *page)
 /* Returns true if the rmap has any entries. O(1) complexity. */
-static bool rmap_has_entries(const struct page_info *page)
+static bool __maybe_unused rmap_has_entries(const struct page_info *page)
     return rmap_count(page) != 0;

Xen-devel mailing list



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