virtio-mem: simplify MAX_ORDER - 1 / pageblock_order handling
authorDavid Hildenbrand <david@redhat.com>
Thu, 12 Nov 2020 13:37:49 +0000 (14:37 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 18 Dec 2020 21:14:25 +0000 (16:14 -0500)
commit20b9150225c8e9599999b4e161192d8a8d56a4cb
treed08873c2269b7245a1487b8a244fcfa73697d089
parent347202dc04a110bdab8d4e1c38ceccd7758fe13e
virtio-mem: simplify MAX_ORDER - 1 / pageblock_order handling

Let's use pageblock_nr_pages and MAX_ORDER_NR_PAGES instead where
possible to simplify.

Add a comment why we have that restriction for now.

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-4-david@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_mem.c