From patchwork Tue May 7 15:14: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: 163538 Delivered-To: patch@linaro.org Received: by 2002:ac9:2a84:0:0:0:0:0 with SMTP id p4csp3883131oca; Tue, 7 May 2019 08:16:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwu3VGbsNk89pwPB+9nF2LjBuJUHKm9sUksS2q8DxPylbJxC+Sg6Kf/wDXhBqJup1K93D1M X-Received: by 2002:a6b:2cc6:: with SMTP id s189mr21328681ios.303.1557242209009; Tue, 07 May 2019 08:16:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557242209; cv=none; d=google.com; s=arc-20160816; b=A5/9e0apLWsGrX3W+fq7/VFUrLp3x/e9xtQ5ZQ6R6StwVsGqoc7E3i6TIHFKW1XO+f fNWcOvRvdbHSzt2SFEDNviLD3wlKMKVNXarlPBuM/cN49vIWopxc8TWf6FuvXIISUJuO foPnPp1YKbdV1Yhi4IHUFvUEZA9YVjYtMwvIQJ6eDia965zZvmUiN7kAl1F/x0mRadS1 oBBLk5rn4oI0te6EY7yNw4V+CyeoexDB1kKyqGXRDfqrnaHHCRVTtj1huheTrhcPNj8+ +2tFxBYH8WmFVP2HsRP3s4ptjjWg/eiCJWENIPEye3SLfe5KVhe75wu2TLCX0ui6tSBD 5x0w== 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=XwYKrOpNbjLy2MZyVMAqh4IyU7x6KwMVk7gyigeTpKg=; b=suF1A3xtgEg/DmmK8oo9k/m0oRnOUL49BtietA3rdHxRc+8HjBToaUZfy6GL2iE/G/ Isb5SLLRevtRWwjAUCv3aFyQYxBHPZ3h1SFTwNSwXN/PD9Ci94gwKCbZjtA44/DLX9sl pcN8XiB9YsPqrEkZyer+r/ClH6AcVdEgvwEpQhCk68Wy4jd6GGZ+qdhcv56meMgs2PDT DtLcxap4yNFdtsJJp2bVALW/HKYFvDcQaOFrz3AtU9erpYgWD3Ex5Nxpg+bqY7F/eW2e qHBQYSWqHNDueFb8bYuwWOEhKbed0Mt94G74N9rA6wNnGLVZC3L+KKy8+tEi0zlKO+Eh Mxow== 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 i18si9794092jac.60.2019.05.07.08.16.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 May 2019 08:16:48 -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 1hO1oJ-0007JP-89; Tue, 07 May 2019 15:15:15 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hO1oI-0007JC-66 for xen-devel@lists.xenproject.org; Tue, 07 May 2019 15:15:14 +0000 X-Inumbo-ID: e97ee661-70da-11e9-843c-bc764e045a96 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTP id e97ee661-70da-11e9-843c-bc764e045a96; Tue, 07 May 2019 15:15:13 +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 2723A15AD; Tue, 7 May 2019 08:15:13 -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 E7EE63F5AF; Tue, 7 May 2019 08:15:11 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 7 May 2019 16:14:46 +0100 Message-Id: <20190507151458.29350-3-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190507151458.29350-1-julien.grall@arm.com> References: <20190507151458.29350-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH 02/14] xen/x86: Constify the parameter "d" in mfn_to_gfn 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 , Julien Grall , Wei Liu , 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 --- Changes in v2: - Fix function name in the title - Add Jan's reviewed-by --- 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 2801a8ccca..c3bd12020e 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));