]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-mem: more precise calculation in virtio_mem_mb_state_prepare_next_mb()
authorDavid Hildenbrand <david@redhat.com>
Thu, 12 Nov 2020 13:37:48 +0000 (14:37 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 18 Dec 2020 21:14:25 +0000 (16:14 -0500)
commit7aff24da7102d70aa307abce1e7d64103b3f0540
treeb300e385bf4a2816357584807af73bca66daf5ba
parent28f5033fb73da2eae579a7b8dc4e2b4c1e85748b
virtio-mem: more precise calculation in virtio_mem_mb_state_prepare_next_mb()

We actually need one byte less (next_mb_id is exclusive, first_mb_id is
inclusive). While at it, compact the code.

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