Message ID | ba2605e168cb65ca7f2e4fcc6b957b5ae0b3062a.1691053438.git.simone.ballarin@bugseng.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | xen: address violations of MISRA C:2012 Rule 7.3 | expand |
On Thu, 3 Aug 2023, Simone Ballarin wrote: > From: Gianluca Luparini <gianluca.luparini@bugseng.com> > > The xen sources contain violations of MISRA C:2012 Rule 7.3 whose headline > states: > "The lowercase character 'l' shall not be used in a literal suffix". > > Use the "L" suffix instead of the "l" suffix, to avoid potential ambiguity. > If the "u" suffix is used near "L", use the "U" suffix instead, for consistency. > > The changes in this patch are mechanical. > > Signed-off-by: Gianluca Luparini <gianluca.luparini@bugseng.com> > Signed-off-by: Simone Ballarin <simone.ballarin@bugseng.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
On 04.08.2023 02:45, Stefano Stabellini wrote: > On Thu, 3 Aug 2023, Simone Ballarin wrote: >> From: Gianluca Luparini <gianluca.luparini@bugseng.com> >> >> The xen sources contain violations of MISRA C:2012 Rule 7.3 whose headline >> states: >> "The lowercase character 'l' shall not be used in a literal suffix". >> >> Use the "L" suffix instead of the "l" suffix, to avoid potential ambiguity. >> If the "u" suffix is used near "L", use the "U" suffix instead, for consistency. >> >> The changes in this patch are mechanical. >> >> Signed-off-by: Gianluca Luparini <gianluca.luparini@bugseng.com> >> Signed-off-by: Simone Ballarin <simone.ballarin@bugseng.com> > > Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Acked-by: Jan Beulich <jbeulich@suse.com>
diff --git a/xen/drivers/passthrough/x86/iommu.c b/xen/drivers/passthrough/x86/iommu.c index d290855959..c85549ccad 100644 --- a/xen/drivers/passthrough/x86/iommu.c +++ b/xen/drivers/passthrough/x86/iommu.c @@ -576,16 +576,16 @@ struct page_info *iommu_alloc_pgtable(struct domain_iommu *hd, ASSERT((CONTIG_LEVEL_SHIFT & (contig_mask >> shift)) == CONTIG_LEVEL_SHIFT); - p[0] = (CONTIG_LEVEL_SHIFT + 0ull) << shift; + p[0] = (CONTIG_LEVEL_SHIFT + 0ULL) << shift; p[1] = 0; - p[2] = 1ull << shift; + p[2] = 1ULL << shift; p[3] = 0; for ( i = 4; i < PAGE_SIZE / sizeof(*p); i += 4 ) { - p[i + 0] = (find_first_set_bit(i) + 0ull) << shift; + p[i + 0] = (find_first_set_bit(i) + 0ULL) << shift; p[i + 1] = 0; - p[i + 2] = 1ull << shift; + p[i + 2] = 1ULL << shift; p[i + 3] = 0; } }