From patchwork Wed Oct 2 18:00:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 175031 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1091066ill; Wed, 2 Oct 2019 11:02:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJ02DP1gKsd9TDQTqu1BHVl4MYnx949QCZKZ9H+b6Ngs96sAwrNeS7oC0tAUXuijr5COXY X-Received: by 2002:a92:83c8:: with SMTP id p69mr5712014ilk.45.1570039356961; Wed, 02 Oct 2019 11:02:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570039356; cv=none; d=google.com; s=arc-20160816; b=Ec2PQn3fNDoNOHY8Ob7+7g6CfwqM0jsH23gfZHzbjrnrfGoBDImdkJGpgS3pO7wQ+o VDaVPTnNh48+po3MUyEtz5f+ACX4IDaubJXwQsH7H4qVIcH4KHfuv0WkhjINs4OegvCQ C2CjtlwO5ZIBkHyPOlhxEEfSzxJUcDMJmPEU8dHXYTgm0zbGZ2CLwfrd8BB4w1dhQlin oifItwwc9aKqaGpuIublKZNlPadlpa8u3olah6O7LHfWqALXOmEArhdpO56C5+SghQtC 9etAeuoitKZ5o1k67CVEGwScslEnVLzMH0ZGuVpRBwTJA3rFTQhPg7wq4+hXAfnRagVY d1Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:references:in-reply-to:message-id:date:to:from; bh=l9yKPfEyY8zwdhPc+BNaBgDpK0M85MdlJ6t+rMXZOO8=; b=WkShoMpSKotgvUvuMrcP1++jccsRCMLJ0e0s/dyOg4dyafvBVZVRRftTrK4T4rSdkr TAVfel1Z9/I51kw9JtP7RY0JwEEgBDzX07tPPGfboLPDZQB4JoMxjQqse8UJb7/87h1l Uc6bZSlVodkoOoO6aByrzNd20IfayWoOdNdTrRonK/RvuQUCrQYRSmgvP/SO4/T90tv5 xfNi78f5ndrdS412X9Gu2/8FE+f9NFyBVEMgAsMIIJhcC0tgobUkwy0phCulpyI9RCVW B5Rrxt910ybRz50GtcNnCmQFbNK0hMc7U4DZUSrJr5NsXxExM6RPOok0Z485WBlvEitO aMwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id u127si27592373ioe.152.2019.10.02.11.02.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 02 Oct 2019 11:02:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) 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 1iFivt-0005I8-3W; Wed, 02 Oct 2019 18:01:01 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iFivr-0005Hb-LC for xen-devel@lists.xenproject.org; Wed, 02 Oct 2019 18:00:59 +0000 X-Inumbo-ID: 96a62a7a-e53e-11e9-8628-bc764e2007e4 Received: from foss.arm.com (unknown [217.140.110.172]) by localhost (Halon) with ESMTP id 96a62a7a-e53e-11e9-8628-bc764e2007e4; Wed, 02 Oct 2019 18:00:59 +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 CF84815A1; Wed, 2 Oct 2019 11:00:58 -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 E25773F706; Wed, 2 Oct 2019 11:00:57 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Wed, 2 Oct 2019 19:00:47 +0100 Message-Id: <20191002180047.17144-7-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 6/6] xen/arm: traps: Mark check_stack_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/traps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index a3b961bd06..a3deb59372 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -54,7 +54,8 @@ * that both the kernel half of struct cpu_user_regs (which is pushed in * entry.S) and struct cpu_info (which lives at the bottom of a Xen * stack) must be doubleword-aligned in size. */ -static inline void check_stack_alignment_constraints(void) { +static void __init __maybe_unused build_assertions(void) +{ #ifdef CONFIG_ARM_64 BUILD_BUG_ON((sizeof (struct cpu_user_regs)) & 0xf); BUILD_BUG_ON((offsetof(struct cpu_user_regs, spsr_el1)) & 0xf);