[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 4/8] xen/arm: Add support for read-only foreign mappings

On 11/15/18 12:02 PM, Andrii Anisov wrote:
чт, 15 лист. 2018 о 13:40 Julien Grall <julien.grall@xxxxxxx> пише:
If I drop _t then I need to add if ( *t ) in 3 places in that code. So I
don't think the approach is any better.
Ouch, I kept in my mind two places.

Something like:

if ( t )
     *t = p2m_invalid;
if ( t )
     *t = ( page->u.inuse.type_info & PGT_writable_page ) ? p2m_ram_rw
: p2m_ram_ro;

If it was fitting in a single line maybe. In that context, I find it more difficult to read.

So I would prefer to stick with _t which is quite common within the p2m code base so far.


Julien Grall

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.