virtio_ring: use helper function is_power_of_2()
authorShaoqin Huang <shaoqin.huang@intel.com>
Fri, 21 Oct 2022 06:27:34 +0000 (23:27 -0700)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 28 Dec 2022 10:28:09 +0000 (05:28 -0500)
commitb9d978a89296c57fbbbd8ea647c303ce4d37028f
tree8c65295579a9c92e5d5e816b4c9a56ef468aed69
parent344686136d73501a18a9621de690ff7824a3d129
virtio_ring: use helper function is_power_of_2()

Use helper function is_power_of_2() to check if num is power of two.
Minor readability improvement.

Signed-off-by: Shaoqin Huang <shaoqin.huang@intel.com>
Message-Id: <20221021062734.228881-3-shaoqin.huang@intel.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
drivers/virtio/virtio_ring.c