]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_balloon: divide/multiply instead of shifts
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 19 Nov 2019 10:25:24 +0000 (05:25 -0500)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 11 Dec 2019 13:14:07 +0000 (08:14 -0500)
commite96250c724bb644cb55b985e11e32bcd8da32169
treecc7783bec788c6b87dc68d93654df3ab96f18ace
parent953a1a330e99751709256b0d0808ceb34e256c1b
virtio_balloon: divide/multiply instead of shifts

We managed to get confused about the shift direction at least once.
Let's switch to division/multiplcation instead. Add a number of pages
macro for this purpose.  We still keep the order macro around too since
this is what alloc/free pages want.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Wei Wang <wei.w.wang@intel.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
drivers/virtio/virtio_balloon.c