From patchwork Wed Oct 2 18:00:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 11171739 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 539BF1920 for ; Wed, 2 Oct 2019 18:02:34 +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 3043621848 for ; Wed, 2 Oct 2019 18:02:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3043621848 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.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 1iFiw6-0005Od-1v; Wed, 02 Oct 2019 18:01:14 +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 1iFiw5-0005O6-2w for xen-devel@lists.xenproject.org; Wed, 02 Oct 2019 18:01:13 +0000 X-Inumbo-ID: 96037564-e53e-11e9-971c-12813bfff9fa Received: from foss.arm.com (unknown [217.140.110.172]) by localhost (Halon) with ESMTP id 96037564-e53e-11e9-971c-12813bfff9fa; Wed, 02 Oct 2019 18:00:57 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ABDA41597; Wed, 2 Oct 2019 11:00:57 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BF5153F706; Wed, 2 Oct 2019 11:00:56 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Wed, 2 Oct 2019 19:00:46 +0100 Message-Id: <20191002180047.17144-6-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20191002180047.17144-1-julien.grall@arm.com> References: <20191002180047.17144-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH for-4.13 5/6] xen/arm: mm: Mark check_memory_layout_alignment_constraints as unused 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: Artem_Mygaiev@epam.com, Volodymyr Babchuk , Julien Grall , Stefano Stabellini , Julien Grall MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Clang will throw an error if a function is unused unless you tell to ignore it. This can be done using __maybe_unused. While modifying the declaration, update it to match prototype of similar functions (see build_assertions). This helps to understand that the sole purpose of the function is to hold BUILD_BUG_ON(). Signed-off-by: Julien Grall Acked-by: Stefano Stabellini --- Changes in v2: - Update the prototype to match style of other functions holding on build assertions. --- xen/arch/arm/mm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index 9e0fdc39f9..be23acfe26 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -190,7 +190,8 @@ unsigned long total_pages; extern char __init_begin[], __init_end[]; /* Checking VA memory layout alignment. */ -static inline void check_memory_layout_alignment_constraints(void) { +static void __init __maybe_unused build_assertions(void) +{ /* 2MB aligned regions */ BUILD_BUG_ON(XEN_VIRT_START & ~SECOND_MASK); BUILD_BUG_ON(FIXMAP_ADDR(0) & ~SECOND_MASK);