From patchwork Tue Jan 7 13:49:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 11320915 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BFF8E138C for ; Tue, 7 Jan 2020 13:50:45 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9A2A720656 for ; Tue, 7 Jan 2020 13:50:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="aN5VmUOM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A2A720656 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iopEz-0007A9-DH; Tue, 07 Jan 2020 13:49:49 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iopEy-0007A0-1K for xen-devel@lists.xenproject.org; Tue, 07 Jan 2020 13:49:48 +0000 X-Inumbo-ID: 90a7009c-3154-11ea-ac08-12813bfff9fa Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 90a7009c-3154-11ea-ac08-12813bfff9fa; Tue, 07 Jan 2020 13:49:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1578404986; h=from:to:cc:subject:date:message-id:mime-version; bh=0oevOZdasruycRFVpcmzVgbOW7yD5e/MvIumfmVZHgI=; b=aN5VmUOMdIZ6cMvrMUCyeGHL/PfldtSEN7dy9ZuZgGjCbatwHKV1JpgC xICNM6aQsLYSRLnYDY40CQ1eVHVCERKEs+ro7aFxOqtHjWPEZbwQXZ7dJ 0BZP16ikXqbOcNP+NWTxkSmbDHdjR9W9CNZyZilbRSWoZlPvGerh5ZfLw g=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@citrix.com; spf=Pass smtp.mailfrom=Andrew.Cooper3@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of andrew.cooper3@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa6.hc3370-68.iphmx.com: domain of Andrew.Cooper3@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="Andrew.Cooper3@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: KIEKqkSMqZyUDa7B871gG4aglr03em1yKrH0e+l43HrNCHQTsRnhlvC83pQSYaphtK1TChMcqw 7nrmgHJxIN63x5Xp0FDsMLU31/Hyy6oPyBkEI8QSqAS0KRyuQIMHcA8EOeD66bsp3d+Ir5xq2x pqGBLmPC4F063ByUFhYh9Bj4n/FVA9QFVYz6aHx2dEJhCarpp1aWOJbdBCAGME5AVOVrrGI13z MBA5nfEx7q3ZJrARSnQvOdMwZT+yAnpq7RLzid/3vRawZlNMImUhrgWtBCaju+Uq5HdbA9rv1W 7AY= X-SBRS: 2.7 X-MesageID: 10974597 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.69,406,1571716800"; d="scan'208";a="10974597" From: Andrew Cooper To: Xen-devel Date: Tue, 7 Jan 2020 13:49:43 +0000 Message-ID: <20200107134943.21063-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] x86/mem_sharing: Fix RANDCONFIG build X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Tamas K Lengyel Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Travis reports: https://travis-ci.org/andyhhp/xen/jobs/633751811 mem_sharing.c:361:13: error: 'rmap_has_entries' defined but not used [-Werror=unused-function] 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 CONFIG_MEM_SHARING is enabled. Mark the helper as maybe_unused. Signed-off-by: Andrew Cooper --- CC: Tamas K Lengyel 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; }