use the macro LOWEST_BIT where appropriate
cover use the macro LOWEST_BIT where appropriate
This series replaces two instances of the pattern (x & -x) with the macro LOWEST_BIT, introduced by the series [1]. Therefore, these patches should be applied on top of patch 1 from that series.
[1] https://marc.info/?l=xen-devel&m=169712438716424&w=2
Nicola Vetrini (2):
xen/vmap: use LOWEST_BIT to wrap a violation of Rule 10.1 xen/iommu: use LOWEST_BIT to wrap a violation of Rule 10.1
xen/common/vmap.c | 2 +- xen/drivers/passthrough/iommu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
--
2.34.1
PATCH 1/2 xen/vmap: use LOWEST_BIT to wrap a violation of Rule 10.1
No functional change.
--- xen/common/vmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/common/vmap.c +1 -1
@@ -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] )
Signature · 1 line
2.34.1
PATCH 2/2 xen/iommu: use LOWEST_BIT to wrap a violation of Rule 10.1
In reply to Nicola VetriniNo functional change.
--- xen/drivers/passthrough/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/drivers/passthrough/iommu.c +1 -1
@@ -560,7 +560,7 @@ int __init iommu_setup(void) rc =iommu_hardware_setup ();if ( !rc ) ops =iommu_get_ops (); -if ( ops && (ops->page_sizes & -ops->page_sizes) !=PAGE_SIZE ) +if ( ops && (LOWEST_BIT (ops->page_sizes)) !=PAGE_SIZE ) {printk (XENLOG_ERR "IOMMU: page size mask %lx unsupported\n" , ops->page_sizes);
Signature · 1 line
2.34.1
Re: [XEN PATCH][for-4.19 1/2] xen/vmap: use LOWEST_BIT to wrap a violation of Rule 10.1
In reply to Nicola VetriniQuoted 3 lines · Nicola Vetrini
No functional change.
Signed-off-by Nicola Vetrini <[email protected]>
Re: [XEN PATCH][for-4.19 2/2] xen/iommu: use LOWEST_BIT to wrap a violation of Rule 10.1
In reply to Nicola VetriniQuoted 3 lines · Nicola Vetrini
No functional change.
Signed-off-by Nicola Vetrini <[email protected]>