[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] tools/xen-hvmctx: drop bogus casts from dump_hpet()
commit 38a98e2280a416fae2711e44f25d391ce7d9f51e Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Thu Oct 4 14:55:15 2018 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Oct 4 14:55:15 2018 +0200 tools/xen-hvmctx: drop bogus casts from dump_hpet() Also specify field widths of the multiple similar lines printed in the course of the loop, to help readability. Make the iteration variable unsigned. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/misc/xen-hvmctx.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/tools/misc/xen-hvmctx.c b/tools/misc/xen-hvmctx.c index ced18e760a..d32989bd0d 100644 --- a/tools/misc/xen-hvmctx.c +++ b/tools/misc/xen-hvmctx.c @@ -316,23 +316,20 @@ static void dump_rtc(void) static void dump_hpet(void) { - int i; HVM_SAVE_TYPE(HPET) h; + unsigned int i; + READ(h); - printf(" HPET: capability %#llx config %#llx\n", - (unsigned long long) h.capability, - (unsigned long long) h.config); - printf(" isr %#llx counter %#llx\n", - (unsigned long long) h.isr, - (unsigned long long) h.mc64); + printf(" HPET: capability %#" PRIx64 " config %#" PRIx64 "\n", + h.capability, h.config); + printf(" isr %#" PRIx64 " counter %#" PRIx64 "\n", + h.isr, h.mc64); for ( i = 0; i < HPET_TIMER_NUM; i++ ) { - printf(" timer%i config %#llx cmp %#llx\n", i, - (unsigned long long) h.timers[i].config, - (unsigned long long) h.timers[i].cmp); - printf(" timer%i period %#llx fsb %#llx\n", i, - (unsigned long long) h.period[i], - (unsigned long long) h.timers[i].fsb); + printf(" timer%u config %#18.16" PRIx64 " cmp %#18.8" PRIx64 "\n", + i, h.timers[i].config, h.timers[i].cmp); + printf(" timer%u period %#18.8" PRIx64 " fsb %#18.8" PRIx64 "\n", + i, h.period[i], h.timers[i].fsb); } } -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |