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

Re: [Xen-devel] [PATCH v9 08/14] xen/x86: factor out map and unmap from the memory_mapping DOMCTL



>>> On 02.07.14 at 20:42, <avanzini.arianna@xxxxxxxxx> wrote:
> +int unmap_mmio_regions(struct domain *d,
> +                       unsigned long start_gfn,
> +                       unsigned long nr,
> +                       unsigned long mfn)
> +{
> +    int ret = 0, err = 0;
> +    unsigned long i;
> +
> +    if ( !paging_mode_translate(d) )
> +        return 0;
> +
> +    for ( i = 0; i < nr; i++ ) {
> +        ret = clear_mmio_p2m_entry(d, start_gfn + i, _mfn(mfn + i));
> +        if ( ret ) err = ret;
> +    }

There are two coding style problems here ({ on a separate line, and
bodies of if()'s belong on separate lines). Additionally the initializer of
"ret" is pointless; in fact you could move that variable into the for()
scope, with the call to clear_mmio_p2m_entry() being the initializer.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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