]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
virtio_balloon: Use outer variable 'page'
authorzhang jiao <zhangjiao2@cmss.chinamobile.com>
Wed, 20 Nov 2024 05:49:20 +0000 (13:49 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 8 Jan 2025 12:29:05 +0000 (07:29 -0500)
There is no need to define a local variable 'page',
just use outer variable 'page'.

Signed-off-by: zhang jiao <zhangjiao2@cmss.chinamobile.com>
Message-Id: <20241120054920.35291-1-zhangjiao2@cmss.chinamobile.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
drivers/virtio/virtio_balloon.c

index b36d2803674efd16b4e274d980c1c94bfc9c44e2..89da052f4f6874a3bfebda83fc9dc3879e3c7f57 100644 (file)
@@ -251,7 +251,7 @@ static unsigned int fill_balloon(struct virtio_balloon *vb, size_t num)
 
        for (num_pfns = 0; num_pfns < num;
             num_pfns += VIRTIO_BALLOON_PAGES_PER_PAGE) {
-               struct page *page = balloon_page_alloc();
+               page = balloon_page_alloc();
 
                if (!page) {
                        dev_info_ratelimited(&vb->vdev->dev,