Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1209828 > unrolled thread

[PATCH] xen/tmem: Pass page instead of pfn to xen_tmem_get_page()

Started byMurilo Opsfelder Araujo <mopsfelder@gmail.com>
First post2015-08-19 15:30 +0200
Last post2015-08-22 17:00 +0200
Articles 5 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] xen/tmem: Pass page instead of pfn to xen_tmem_get_page() Murilo Opsfelder Araujo <mopsfelder@gmail.com> - 2015-08-19 15:30 +0200
    Re: [PATCH] xen/tmem: Pass page instead of pfn to xen_tmem_get_page() Julien Grall <julien.grall@citrix.com> - 2015-08-20 02:30 +0200
      Re: [PATCH] xen/tmem: Pass page instead of pfn to xen_tmem_get_page() Murilo Opsfelder Araújo <mopsfelder@gmail.com> - 2015-08-22 17:00 +0200
    Re: [PATCH] xen/tmem: Pass page instead of pfn to xen_tmem_get_page() David Vrabel <david.vrabel@citrix.com> - 2015-08-20 13:30 +0200
      Re: [PATCH] xen/tmem: Pass page instead of pfn to xen_tmem_get_page() Murilo Opsfelder Araújo <mopsfelder@gmail.com> - 2015-08-22 17:00 +0200

#1209828 — [PATCH] xen/tmem: Pass page instead of pfn to xen_tmem_get_page()

FromMurilo Opsfelder Araujo <mopsfelder@gmail.com>
Date2015-08-19 15:30 +0200
Subject[PATCH] xen/tmem: Pass page instead of pfn to xen_tmem_get_page()
Message-ID<pZbBg-7a5-15@gated-at.bofh.it>
The commit 091208a676dfdabb2b8fe86ee155c6fc80081b69 "xen/tmem: Use
xen_page_to_gfn rather than pfn_to_gfn" left behind a call to
xen_tmem_get_page() receiving pfn instead of page.

This change also fixes the following build warning:

drivers/xen/tmem.c: In function ‘tmem_cleancache_get_page’:
drivers/xen/tmem.c:194:47: warning: passing argument 4 of ‘xen_tmem_get_page’ makes pointer from integer without a cast
  ret = xen_tmem_get_page((u32)pool, oid, ind, pfn);
                                               ^
drivers/xen/tmem.c:138:12: note: expected ‘struct page *’ but argument is of type ‘long unsigned int’
 static int xen_tmem_get_page(u32 pool_id, struct tmem_oid oid,
            ^

Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
---
 drivers/xen/tmem.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/xen/tmem.c b/drivers/xen/tmem.c
index b0c895e..945fc43 100644
--- a/drivers/xen/tmem.c
+++ b/drivers/xen/tmem.c
@@ -183,7 +183,6 @@ static int tmem_cleancache_get_page(int pool, struct cleancache_filekey key,
 {
 	u32 ind = (u32) index;
 	struct tmem_oid oid = *(struct tmem_oid *)&key;
-	unsigned long pfn = page_to_pfn(page);
 	int ret;
 
 	/* translate return values to linux semantics */
@@ -191,7 +190,7 @@ static int tmem_cleancache_get_page(int pool, struct cleancache_filekey key,
 		return -1;
 	if (ind != index)
 		return -1;
-	ret = xen_tmem_get_page((u32)pool, oid, ind, pfn);
+	ret = xen_tmem_get_page((u32)pool, oid, ind, page);
 	if (ret == 1)
 		return 0;
 	else
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1210095

FromJulien Grall <julien.grall@citrix.com>
Date2015-08-20 02:30 +0200
Message-ID<pZlTY-5bn-5@gated-at.bofh.it>
In reply to#1209828
Hi,

On 19/08/2015 06:25, Murilo Opsfelder Araujo wrote:
> The commit 091208a676dfdabb2b8fe86ee155c6fc80081b69 "xen/tmem: Use
> xen_page_to_gfn rather than pfn_to_gfn" left behind a call to
> xen_tmem_get_page() receiving pfn instead of page.
>
> This change also fixes the following build warning:
>
> drivers/xen/tmem.c: In function ‘tmem_cleancache_get_page’:
> drivers/xen/tmem.c:194:47: warning: passing argument 4 of ‘xen_tmem_get_page’ makes pointer from integer without a cast
>    ret = xen_tmem_get_page((u32)pool, oid, ind, pfn);
>                                                 ^
> drivers/xen/tmem.c:138:12: note: expected ‘struct page *’ but argument is of type ‘long unsigned int’
>   static int xen_tmem_get_page(u32 pool_id, struct tmem_oid oid,
>              ^
>
> Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>

Sorry for the breakage, I haven't spot it because CONFIG_CLEANCACHE is 
not enabled on my config.

Reviewed-by: Julien Grall <julien.grall@citrix.com>

Regards,

-- 
Julien Grall
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1211477

FromMurilo Opsfelder Araújo <mopsfelder@gmail.com>
Date2015-08-22 17:00 +0200
Message-ID<q0ir0-5f0-1@gated-at.bofh.it>
In reply to#1210095
On Wed, Aug 19, 2015 at 9:23 PM, Julien Grall <julien.grall@citrix.com> wrote:
> Hi,
>
> On 19/08/2015 06:25, Murilo Opsfelder Araujo wrote:
>>
>> The commit 091208a676dfdabb2b8fe86ee155c6fc80081b69 "xen/tmem: Use
>> xen_page_to_gfn rather than pfn_to_gfn" left behind a call to
>> xen_tmem_get_page() receiving pfn instead of page.
>>
>> This change also fixes the following build warning:
>>
>> drivers/xen/tmem.c: In function ‘tmem_cleancache_get_page’:
>> drivers/xen/tmem.c:194:47: warning: passing argument 4 of
>> ‘xen_tmem_get_page’ makes pointer from integer without a cast
>>    ret = xen_tmem_get_page((u32)pool, oid, ind, pfn);
>>                                                 ^
>> drivers/xen/tmem.c:138:12: note: expected ‘struct page *’ but argument is
>> of type ‘long unsigned int’
>>   static int xen_tmem_get_page(u32 pool_id, struct tmem_oid oid,
>>              ^
>>
>> Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
>
>
> Sorry for the breakage, I haven't spot it because CONFIG_CLEANCACHE is not
> enabled on my config.
>
> Reviewed-by: Julien Grall <julien.grall@citrix.com>
>
> Regards,
>
> --
> Julien Grall

Hi, Julien.

No need to apologize, and thanks for reviewing that.

-- 
Murilo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1210429

FromDavid Vrabel <david.vrabel@citrix.com>
Date2015-08-20 13:30 +0200
Message-ID<pZwcG-3pE-27@gated-at.bofh.it>
In reply to#1209828
On 19/08/15 14:25, Murilo Opsfelder Araujo wrote:
> The commit 091208a676dfdabb2b8fe86ee155c6fc80081b69 "xen/tmem: Use
> xen_page_to_gfn rather than pfn_to_gfn" left behind a call to
> xen_tmem_get_page() receiving pfn instead of page.
> 
> This change also fixes the following build warning:
> 
> drivers/xen/tmem.c: In function ‘tmem_cleancache_get_page’:
> drivers/xen/tmem.c:194:47: warning: passing argument 4 of ‘xen_tmem_get_page’ makes pointer from integer without a cast
>   ret = xen_tmem_get_page((u32)pool, oid, ind, pfn);
>                                                ^
> drivers/xen/tmem.c:138:12: note: expected ‘struct page *’ but argument is of type ‘long unsigned int’
>  static int xen_tmem_get_page(u32 pool_id, struct tmem_oid oid,

I've folded this in, thanks.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1211478

FromMurilo Opsfelder Araújo <mopsfelder@gmail.com>
Date2015-08-22 17:00 +0200
Message-ID<q0ir0-5f0-3@gated-at.bofh.it>
In reply to#1210429
On Thu, Aug 20, 2015 at 8:27 AM, David Vrabel <david.vrabel@citrix.com> wrote:
> On 19/08/15 14:25, Murilo Opsfelder Araujo wrote:
>> The commit 091208a676dfdabb2b8fe86ee155c6fc80081b69 "xen/tmem: Use
>> xen_page_to_gfn rather than pfn_to_gfn" left behind a call to
>> xen_tmem_get_page() receiving pfn instead of page.
>>
>> This change also fixes the following build warning:
>>
>> drivers/xen/tmem.c: In function ‘tmem_cleancache_get_page’:
>> drivers/xen/tmem.c:194:47: warning: passing argument 4 of ‘xen_tmem_get_page’ makes pointer from integer without a cast
>>   ret = xen_tmem_get_page((u32)pool, oid, ind, pfn);
>>                                                ^
>> drivers/xen/tmem.c:138:12: note: expected ‘struct page *’ but argument is of type ‘long unsigned int’
>>  static int xen_tmem_get_page(u32 pool_id, struct tmem_oid oid,
>
> I've folded this in, thanks.
>
> David

Thanks, David.

-- 
Murilo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web