]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
virtio-mem: use "unsigned long" for nr_pages when fake onlining/offlining
authorDavid Hildenbrand <david@redhat.com>
Thu, 12 Nov 2020 13:37:51 +0000 (14:37 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 18 Dec 2020 21:14:25 +0000 (16:14 -0500)
No harm done, but let's be consistent.

Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Reviewed-by: Wei Yang <richard.weiyang@linux.alibaba.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20201112133815.13332-6-david@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_mem.c

index 4f18d9855a0edbdc06b7ed626673b0704ff50016..94451b401fba66f78177ddfaefa5d42ee42fab44 100644 (file)
@@ -717,7 +717,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);
@@ -736,7 +736,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);
@@ -751,10 +751,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