Re: [PATCH v1 11/29] virtio-mem: use "unsigned long" for nr_pages when fake onlining/offlining

2020-10-16 Thread Wei Yang
On Mon, Oct 12, 2020 at 02:53:05PM +0200, David Hildenbrand wrote:
>No harm done, but let's be consistent.
>
>Cc: "Michael S. Tsirkin" 
>Cc: Jason Wang 
>Cc: Pankaj Gupta 
>Signed-off-by: David Hildenbrand 

Reviewed-by: Wei Yang 

>---
> drivers/virtio/virtio_mem.c | 8 
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c
>index cb2e8f254650..00d1cfca4713 100644
>--- a/drivers/virtio/virtio_mem.c
>+++ b/drivers/virtio/virtio_mem.c
>@@ -766,7 +766,7 @@ static int virtio_mem_memory_notifier_cb(struct 
>notifier_block *nb,
>  * (via generic_online_page()) using PageDirty().
>  */
> static void virtio_mem_set_fake_offline(unsigned long pfn,
>-  unsigned int nr_pages, bool onlined)
>+  unsigned long nr_pages, bool onlined)
> {
>   for (; nr_pages--; pfn++) {
>   struct page *page = pfn_to_page(pfn);
>@@ -785,7 +785,7 @@ static void virtio_mem_set_fake_offline(unsigned long pfn,
>  * (via generic_online_page()), clear PageDirty().
>  */
> static void virtio_mem_clear_fake_offline(unsigned long pfn,
>-unsigned int nr_pages, bool onlined)
>+unsigned long nr_pages, bool onlined)
> {
>   for (; nr_pages--; pfn++) {
>   struct page *page = pfn_to_page(pfn);
>@@ -800,10 +800,10 @@ static void virtio_mem_clear_fake_offline(unsigned long 
>pfn,
>  * Release a range of fake-offline pages to the buddy, effectively
>  * fake-onlining them.
>  */
>-static void virtio_mem_fake_online(unsigned long pfn, unsigned int nr_pages)
>+static void virtio_mem_fake_online(unsigned long pfn, unsigned long nr_pages)
> {
>   const unsigned long max_nr_pages = MAX_ORDER_NR_PAGES;
>-  int i;
>+  unsigned long i;
> 
>   /*
>* We are always called at least with MAX_ORDER_NR_PAGES
>-- 
>2.26.2

-- 
Wei Yang
Help you, Help me


Re: [PATCH v1 11/29] virtio-mem: use "unsigned long" for nr_pages when fake onlining/offlining

2020-10-15 Thread Pankaj Gupta
> No harm done, but let's be consistent.
>
> Cc: "Michael S. Tsirkin" 
> Cc: Jason Wang 
> Cc: Pankaj Gupta 
> Signed-off-by: David Hildenbrand 
> ---
>  drivers/virtio/virtio_mem.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c
> index cb2e8f254650..00d1cfca4713 100644
> --- a/drivers/virtio/virtio_mem.c
> +++ b/drivers/virtio/virtio_mem.c
> @@ -766,7 +766,7 @@ static int virtio_mem_memory_notifier_cb(struct 
> notifier_block *nb,
>   * (via generic_online_page()) using PageDirty().
>   */
>  static void virtio_mem_set_fake_offline(unsigned long pfn,
> -   unsigned int nr_pages, bool onlined)
> +   unsigned long nr_pages, bool onlined)
>  {
> for (; nr_pages--; pfn++) {
> struct page *page = pfn_to_page(pfn);
> @@ -785,7 +785,7 @@ static void virtio_mem_set_fake_offline(unsigned long pfn,
>   * (via generic_online_page()), clear PageDirty().
>   */
>  static void virtio_mem_clear_fake_offline(unsigned long pfn,
> - unsigned int nr_pages, bool onlined)
> + unsigned long nr_pages, bool 
> onlined)
>  {
> for (; nr_pages--; pfn++) {
> struct page *page = pfn_to_page(pfn);
> @@ -800,10 +800,10 @@ static void virtio_mem_clear_fake_offline(unsigned long 
> pfn,
>   * Release a range of fake-offline pages to the buddy, effectively
>   * fake-onlining them.
>   */
> -static void virtio_mem_fake_online(unsigned long pfn, unsigned int nr_pages)
> +static void virtio_mem_fake_online(unsigned long pfn, unsigned long nr_pages)
>  {
> const unsigned long max_nr_pages = MAX_ORDER_NR_PAGES;
> -   int i;
> +   unsigned long i;
>
> /*
>  * We are always called at least with MAX_ORDER_NR_PAGES

Reviewed-by: Pankaj Gupta 


[PATCH v1 11/29] virtio-mem: use "unsigned long" for nr_pages when fake onlining/offlining

2020-10-12 Thread David Hildenbrand
No harm done, but let's be consistent.

Cc: "Michael S. Tsirkin" 
Cc: Jason Wang 
Cc: Pankaj Gupta 
Signed-off-by: David Hildenbrand 
---
 drivers/virtio/virtio_mem.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c
index cb2e8f254650..00d1cfca4713 100644
--- a/drivers/virtio/virtio_mem.c
+++ b/drivers/virtio/virtio_mem.c
@@ -766,7 +766,7 @@ static int virtio_mem_memory_notifier_cb(struct 
notifier_block *nb,
  * (via generic_online_page()) using PageDirty().
  */
 static void virtio_mem_set_fake_offline(unsigned long pfn,
-   unsigned int nr_pages, bool onlined)
+   unsigned long nr_pages, bool onlined)
 {
for (; nr_pages--; pfn++) {
struct page *page = pfn_to_page(pfn);
@@ -785,7 +785,7 @@ static void virtio_mem_set_fake_offline(unsigned long pfn,
  * (via generic_online_page()), clear PageDirty().
  */
 static void virtio_mem_clear_fake_offline(unsigned long pfn,
- unsigned int nr_pages, bool onlined)
+ unsigned long nr_pages, bool onlined)
 {
for (; nr_pages--; pfn++) {
struct page *page = pfn_to_page(pfn);
@@ -800,10 +800,10 @@ static void virtio_mem_clear_fake_offline(unsigned long 
pfn,
  * Release a range of fake-offline pages to the buddy, effectively
  * fake-onlining them.
  */
-static void virtio_mem_fake_online(unsigned long pfn, unsigned int nr_pages)
+static void virtio_mem_fake_online(unsigned long pfn, unsigned long nr_pages)
 {
const unsigned long max_nr_pages = MAX_ORDER_NR_PAGES;
-   int i;
+   unsigned long i;
 
/*
 * We are always called at least with MAX_ORDER_NR_PAGES
-- 
2.26.2