From patchwork Mon Feb 18 11:35:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 158593 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2384407jaa; Mon, 18 Feb 2019 03:38:01 -0800 (PST) X-Google-Smtp-Source: AHgI3IaA9eDLu6DKv2hfiFx4PsPixED3z7Tt4byu5u4jtOSJ9R5Dc1rsHhsHU8f+Kj0ni1tOstj3 X-Received: by 2002:a25:4703:: with SMTP id u3mr18883128yba.49.1550489881884; Mon, 18 Feb 2019 03:38:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550489881; cv=none; d=google.com; s=arc-20160816; b=qbZlMBT+9akoRnqCnr/ylL7sb52MQ3KN6xVHm9WHwzi+uWTkrezj2P1NVOD09cXVhG U6T+AlQSnkhN5jE4hZciLidFl/01nG/G7HsUCICoxwvCa+qJ6JUHtZy4bxjiTCeqtliY H5zgJOKgpUyRyi3GS+WL0tdnw6XFlQ2LdcoEe86CETjqQr6X7czEWtpKgXGEav6hkzrn IHSadRsQv9VTYVfpnRzJZIOgtmXhUUvDqc83G5AFbStNBHoly5CSwhCbOKleAs5gFYJ4 8cYQIbEapCYSLVUUz7L0ra5YnX/U3bHOkFbEkJsGTS7hFCdyhpb1PBurcPbwxeFSUSat cgHQ== 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=6svcBUaUbFretAoTpx/A63mX6SsW78Bx1pkcu7EuS3A=; b=E4XPuZ0afQwlGjqUYPU33PeCDReMP0mz+clk/RvJdKFj6WJu63ZRI7exKcnyRz6PNz aQ8iyBfACbcPXT6ZnMGldD88KsvVB32dP9m7nFBzhQgL+S9GUBMmxibGJaVJyUQLko2T Tj0S08g3FD2kEM1rJV3a7d1BUqFIhWe3H1X8BgIkLMpQgD7w20mVCkgHml/PoPyOQIga YcZ/TJuUWS/xtqMkQNIuFw5dBnJHIbPFNmc2NWhgwnCuLv7sUdtQYhIYB70nk2HdHWSj 9Q36ba/BC+U0ZTFQR0PZxOsawEOTvnU6nb4S2V/kohE5T03id6ThpOmFH2BVOOOSapJE G3Lw== 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 z127si7400578ywb.337.2019.02.18.03.38.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Feb 2019 03:38:01 -0800 (PST) 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 1gvhDb-0001yh-3H; Mon, 18 Feb 2019 11:36:15 +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 1gvhDY-0001xf-UZ for xen-devel@lists.xenproject.org; Mon, 18 Feb 2019 11:36:12 +0000 X-Inumbo-ID: 648b0e7c-3371-11e9-8ab2-db931bc02096 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 648b0e7c-3371-11e9-8ab2-db931bc02096; Mon, 18 Feb 2019 11:36:12 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 16E1E1650; Mon, 18 Feb 2019 03:36:12 -0800 (PST) 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 1C7E63F720; Mon, 18 Feb 2019 03:36:08 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 18 Feb 2019 11:35:53 +0000 Message-Id: <20190218113600.9540-3-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190218113600.9540-1-julien.grall@arm.com> References: <20190218113600.9540-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH for-next 2/9] xen/x86: Constify the parameter "d" in mfn_to_mfn 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: sstabellini@kernel.org, Wei Liu , Andrew Cooper , Julien Grall , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The parameter "d" holds the domain and is not modified by the function. So constify it. Signed-off-by: Julien Grall Reviewed-by: Jan Beulich --- xen/include/asm-x86/p2m.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/asm-x86/p2m.h b/xen/include/asm-x86/p2m.h index 2095076556..b6852dc133 100644 --- a/xen/include/asm-x86/p2m.h +++ b/xen/include/asm-x86/p2m.h @@ -506,7 +506,7 @@ static inline struct page_info *get_page_from_gfn( } /* General conversion function from mfn to gfn */ -static inline unsigned long mfn_to_gfn(struct domain *d, mfn_t mfn) +static inline unsigned long mfn_to_gfn(const struct domain *d, mfn_t mfn) { if ( paging_mode_translate(d) ) return get_gpfn_from_mfn(mfn_x(mfn));