[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 5/8] xen/arm: Implement a virtual UART
On Thu, 2013-08-01 at 13:43 +0100, Julien Grall wrote: > >> > >> - switch ( offset ) > >> - { > >> - case UARTDR: > >> + if ( offset == d->arch.vuart.info->data_off ) > >> /* ignore any status bits */ > >> - uart0_print_char((int)((*r) & 0xFF)); > >> - return 1; > >> - case UARTFR: > >> - /* Silently ignore */ > >> - return 1; > >> - default: > >> - printk("VPL011: unhandled write r%d=%"PRIregister" offset > >> %#08x\n", > >> - dabt.reg, *r, offset); > >> - domain_crash_synchronous(); > >> - } > >> + vuart_print_char((int)((*r) & 0xFF)); > > > > What's this cast to int for? The argument is implicitly cast to char in > > any case. It's also a bity surprising that we've got a struct vcpu *v > > in our hands this far down the stack but vuart_print_char() uses current. > > (I realise that both these things are issues in the existing code but > > since you're already touching it it might be worth cleaning up.) > > I don't see any reason for the cast, the code come from Ian Campbell. > Ian, do know why? Nope ;-) If there was a reason I've no idea what it was... Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |