x86: Make printks consistent in hvm_set_callback_via function
PATCH 1/1 x86: Make printks consistent in hvm_set_callback_via function
The printks in the switch statement do not match the dprintk used immediately before the switch statement. This leads to confusing messages being printed to the Xen console log on non-debug versions of Xen.
--- xen/arch/x86/hvm/irq.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
xen/arch/x86/hvm/irq.c +5 -4
@@ -390,16 +390,17 @@ void hvm_set_callback_via(struct domain *d, uint64_t via)switch ( via_type ) {case HVMIRQ_callback_gsi: -printk ("GSI %u\n" , gsi); +dprintk (XENLOG_G_INFO ,"GSI %u\n" , gsi);break ;case HVMIRQ_callback_pci_intx: -printk ("PCI INTx Dev 0x%02x Int%c\n" , pdev,'A' + pintx); +dprintk (XENLOG_G_INFO ,"PCI INTx Dev 0x%02x Int%c\n" , pdev, +'A' + pintx);break ;case HVMIRQ_callback_vector: -printk ("Direct Vector 0x%02x\n" , (uint8_t )via); +dprintk (XENLOG_G_INFO ,"Direct Vector 0x%02x\n" , (uint8_t )via);break ;default : -printk ("None\n" ); +dprintk (XENLOG_G_INFO ,"None\n" );break ; } }
Signature · 1 line
1.7.12.4
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 16.12.15 at 15:21, <[email protected]> wrote:
The printks in the switch statement do not match the dprintk used immediately before the switch statement.
And validly so, due to the lack of a newline on the first one.
Quoted 2 lines
This leads to confusing messages
being printed to the Xen console log on non-debug versions of Xen.
I'm not sure I follow, but I'm pretty sure what would result on debug builds with your change in place would be even more confusing.
If confusing messages result on non-debug builds, then this needs fixing elsewhere (or perhaps is a regression from 1e8193b578, albeit I can't see how that would be).
Jan