diff mbox

[07/22] xen/arm: p2m: Use p2m_is_foreign in get_page_from_gfn to avoid open coding

Message ID 1469031064-23344-8-git-send-email-julien.grall@arm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Julien Grall July 20, 2016, 4:10 p.m. UTC
No functional change.

Signed-off-by: Julien Grall <julien.grall@arm.com>
---
 xen/include/asm-arm/p2m.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Stabellini July 26, 2016, 10:33 p.m. UTC | #1
On Wed, 20 Jul 2016, Julien Grall wrote:
> No functional change.
> 
> Signed-off-by: Julien Grall <julien.grall@arm.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


>  xen/include/asm-arm/p2m.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
> index 8fe78c1..dbbcefe 100644
> --- a/xen/include/asm-arm/p2m.h
> +++ b/xen/include/asm-arm/p2m.h
> @@ -227,7 +227,7 @@ static inline struct page_info *get_page_from_gfn(
>       * get_page won't work on foreign mapping because the page doesn't
>       * belong to the current domain.
>       */
> -    if ( p2mt == p2m_map_foreign )
> +    if ( p2m_is_foreign(p2mt) )
>      {
>          struct domain *fdom = page_get_owner_and_reference(page);
>          ASSERT(fdom != NULL);
> -- 
> 1.9.1
>
diff mbox

Patch

diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
index 8fe78c1..dbbcefe 100644
--- a/xen/include/asm-arm/p2m.h
+++ b/xen/include/asm-arm/p2m.h
@@ -227,7 +227,7 @@  static inline struct page_info *get_page_from_gfn(
      * get_page won't work on foreign mapping because the page doesn't
      * belong to the current domain.
      */
-    if ( p2mt == p2m_map_foreign )
+    if ( p2m_is_foreign(p2mt) )
     {
         struct domain *fdom = page_get_owner_and_reference(page);
         ASSERT(fdom != NULL);