[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1dd9689c-f392-4bb9-a3f6-359d84bb3183@redhat.com>
Date: Wed, 20 Nov 2024 09:54:55 +0100
From: David Hildenbrand <david@...hat.com>
To: zhangjiao2 <zhangjiao2@...s.chinamobile.com>, mst@...hat.com
Cc: jasowang@...hat.com, virtualization@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] virtio_balloon: Use outer variable 'page'
On 20.11.24 06:49, zhangjiao2 wrote:
> From: zhang jiao <zhangjiao2@...s.chinamobile.com>
>
> There is no need to define a local variable 'page',
> just use outer variable 'page'.
>
> Signed-off-by: zhang jiao <zhangjiao2@...s.chinamobile.com>
> ---
> drivers/virtio/virtio_balloon.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
> index b36d2803674e..89da052f4f68 100644
> --- a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -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,
Looks reasonable
Reviewed-by: David Hildenbrand <david@...hat.com>
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists