[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86/viridian: address violations of MISRA C:2012 Rule 7.3
commit a22f0de322c288d26e9f29179beef1e1779ccfbd Author: Gianluca Luparini <gianluca.luparini@xxxxxxxxxxx> AuthorDate: Tue Sep 12 11:01:19 2023 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Sep 12 11:01:19 2023 +0200 x86/viridian: address violations of MISRA C:2012 Rule 7.3 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@xxxxxxxxxxx> Signed-off-by: Simone Ballarin <simone.ballarin@xxxxxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> Reviewed-by: Paul Durrant <paul@xxxxxxx> --- xen/arch/x86/hvm/viridian/synic.c | 2 +- xen/arch/x86/hvm/viridian/time.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/hvm/viridian/synic.c b/xen/arch/x86/hvm/viridian/synic.c index 83d7addfc3..8cf600cec6 100644 --- a/xen/arch/x86/hvm/viridian/synic.c +++ b/xen/arch/x86/hvm/viridian/synic.c @@ -233,7 +233,7 @@ int viridian_synic_rdmsr(const struct vcpu *v, uint32_t idx, uint64_t *val) * should be set to. Assume everything but the bottom bit * should be zero. */ - *val = 1ul; + *val = 1UL; break; case HV_X64_MSR_SIEFP: diff --git a/xen/arch/x86/hvm/viridian/time.c b/xen/arch/x86/hvm/viridian/time.c index a3ea3fa067..137577384f 100644 --- a/xen/arch/x86/hvm/viridian/time.c +++ b/xen/arch/x86/hvm/viridian/time.c @@ -66,7 +66,7 @@ static void update_reference_tsc(const struct domain *d, bool initialize) * The offset value is calculated on restore after migration and * ensures that Windows will not see a large jump in ReferenceTime. */ - p->tsc_scale = ((10000ul << 32) / d->arch.tsc_khz) << 32; + p->tsc_scale = ((10000UL << 32) / d->arch.tsc_khz) << 32; p->tsc_offset = trc->off; smp_wmb(); @@ -79,7 +79,7 @@ static uint64_t trc_val(const struct domain *d, int64_t offset) uint64_t tsc, scale; tsc = hvm_get_guest_tsc(pt_global_vcpu_target(d)); - scale = ((10000ul << 32) / d->arch.tsc_khz) << 32; + scale = ((10000UL << 32) / d->arch.tsc_khz) << 32; return hv_scale_tsc(tsc, scale, offset); } @@ -201,7 +201,7 @@ static void start_stimer(struct viridian_stimer *vs) ASSERT(expiration - now > 0); vs->expiration = expiration; - timeout = (expiration - now) * 100ull; + timeout = (expiration - now) * 100ULL; vs->started = true; clear_bit(stimerx, &vv->stimer_pending); @@ -413,14 +413,14 @@ int viridian_time_rdmsr(const struct vcpu *v, uint32_t idx, uint64_t *val) if ( viridian_feature_mask(d) & HVMPV_no_freq ) return X86EMUL_EXCEPTION; - *val = (uint64_t)d->arch.tsc_khz * 1000ull; + *val = (uint64_t)d->arch.tsc_khz * 1000ULL; break; case HV_X64_MSR_APIC_FREQUENCY: if ( viridian_feature_mask(d) & HVMPV_no_freq ) return X86EMUL_EXCEPTION; - *val = 1000000000ull / APIC_BUS_CYCLE_NS; + *val = 1000000000ULL / APIC_BUS_CYCLE_NS; break; case HV_X64_MSR_REFERENCE_TSC: -- generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |