diff mbox series

[XEN,for-4.19,1/2] xen/vmap: use LOWEST_BIT to wrap a violation of Rule 10.1

Message ID 29c1c01f54d6ac9fccc86b72ee96cc66672ac57a.1697125949.git.nicola.vetrini@bugseng.com (mailing list archive)
State New, archived
Headers show
Series use the macro LOWEST_BIT where appropriate | expand

Commit Message

Nicola Vetrini Oct. 12, 2023, 3:57 p.m. UTC
No functional change.

Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 xen/common/vmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefano Stabellini Oct. 12, 2023, 11:49 p.m. UTC | #1
On Thu, 12 Oct 2023, Nicola Vetrini wrote:
> No functional change.
> 
> Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
diff mbox series

Patch

diff --git a/xen/common/vmap.c b/xen/common/vmap.c
index 4fd6b3067ec1..34e99d780c03 100644
--- a/xen/common/vmap.c
+++ b/xen/common/vmap.c
@@ -53,7 +53,7 @@  static void *vm_alloc(unsigned int nr, unsigned int align,
     if ( !align )
         align = 1;
     else if ( align & (align - 1) )
-        align &= -align;
+        align = LOWEST_BIT(align);
 
     ASSERT((t >= VMAP_DEFAULT) && (t < VMAP_REGION_NR));
     if ( !vm_base[t] )