commit | 6f274444c579305d14d355bab24af31ea2bef224 | [log] [tgz] |
---|---|---|
author | Zhenzhong Duan <zhenzhong.duan@intel.com> | Wed Jun 05 16:30:31 2024 +0800 |
committer | Cédric Le Goater <clg@redhat.com> | Mon Jun 24 23:15:30 2024 +0200 |
tree | 6054ac4f2962035c04b000c0064dff570548adec | |
parent | 9005f928447841ed253e000d5e8220e381872cb0 [diff] |
range: Introduce range_get_last_bit() This helper get the highest 1 bit position of the upper bound. If the range is empty or upper bound is zero, -1 is returned. Suggested-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>