use the macro ISOLATE_LSB where appropriate
v3 cover use the macro ISOLATE_LSB where appropriate
This series replaces two instances of the pattern (x & -x) with the macro ISOLATE_LSB.
Nicola Vetrini (2):
xen/vmap: use ISOLATE_LSB to wrap a violation of Rule 10.1 xen/iommu: use ISOLATE_LSB 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(-)
Signature · 1 line
2.34.1
PATCH v3 1/2 xen/vmap: use ISOLATE_LSB to wrap a violation of Rule 10.1
No functional change.
---
Changes in v2:
- Changed macro name
Changes in v3:
- Changed macro name
--- 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 =ISOLATE_LSB (align);ASSERT ((t >=VMAP_DEFAULT ) && (t <VMAP_REGION_NR ));if ( !vm_base[t] )
Signature · 1 line
2.34.1
PATCH v3 2/2 xen/iommu: use ISOLATE_LSB to wrap a violation of Rule 10.1
In reply to Nicola VetriniNo functional change.
---
Changes in v2:
- Changed macro name
Changes in v3:
- Changed macro name
--- 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 && (ISOLATE_LSB (ops->page_sizes)) !=PAGE_SIZE ) {printk (XENLOG_ERR "IOMMU: page size mask %lx unsupported\n" , ops->page_sizes);
Signature · 1 line
2.34.1
Quoted 10 lines · Nicola Vetrini
This series replaces two instances of the pattern (x & -x) with the macro
ISOLATE_LSB.Nicola Vetrini (2):
xen/vmap: useISOLATE_LSBto wrap a violation of Rule 10.1 xen/iommu: useISOLATE_LSBto wrap a violation of Rule 10.1xen/common/vmap.c | 2 +- xen/drivers/passthrough/iommu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Just to mention it: This is an example of where tracking the various pieces of Misra work is artificially made difficult (see e.g. earlier respective remarks by Julien). Why wasn't this combined into a single series together with the 3-patch one sent the same minute?
Jan
Quoted 12 lines · Jan Beulich
Quoted 10 lines · Nicola Vetrini
This series replaces two instances of the pattern (x & -x) with the macro
ISOLATE_LSB.Nicola Vetrini (2):
xen/vmap: useISOLATE_LSBto wrap a violation of Rule 10.1 xen/iommu: useISOLATE_LSBto wrap a violation of Rule 10.1xen/common/vmap.c | 2 +- xen/drivers/passthrough/iommu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Quoted 6 lines
Just to mention it: This is an example of where tracking the various pieces of Misra work is artificially made difficult (see e.g. earlier respective remarks by Julien). Why wasn't this combined into a single series together with the 3-patch one sent the same minute?
Jan
I didn't think of collapsing them
Signature · 2 lines
Nicola Vetrini, BSc Software Engineer, BUGSENG srl (https://bugseng.com)