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

Re: [Xen-devel] [PATCH v1 3/3] xen/arm: smmu: Renaming struct iommu_domain *domain to, struct iommu_domain *iommu_domain



From: Julien Grall <julien.grall@xxxxxxxxxx>
Sent: Friday, March 27, 2015 7:11 PM
To: Jaggi, Manish; Xen Devel; Prasun.kapoor@xxxxxxxxxx; Kumar, Vijaya; Ian 
Campbell; Stefano Stabellini
Subject: Re: [PATCH v1 3/3] xen/arm: smmu: Renaming struct iommu_domain *domain 
to, struct iommu_domain *iommu_domain

On 27/03/15 13:26, Jaggi, Manish wrote:
> On 27/03/15 07:24, Manish Jaggi wrote:
>> It is good for code readability as there are many structures ending with
>> the name domain.
>> Also a code like this one is now easy to understand with the rename
>> old: dev_iommu_domain(dev) = domain;
>> new: dev_iommu_domain(dev) = iommu_domain;
> [manish] Did u see this line

I don't care about the new vs old stuff. What I care is keeping the code
as close as possible to the Linux code.

[manish] then you are missing a point my friend. The line mentioned old is not 
at all intuitive and is confusing. 
 I am not proposing a design change. All I am asking to add a prefix to 
iommu_domain pointers as was already done for smmu_domain pointers.

> You are modifying the code from Linux just for your own comprehension.
> And we are trying to not diverge from a specific Linux commit in order
> to easily backport patch.
>
> [manish] please rethink on nack. There are so many data structures ending in 
> _domain we need to provide proper naming.

We have 3 structure finishing data structures ending by _domain but the
all have a different prefix and described when necessary.

[manish] But it is hard to follow sometimes and maintaining and debugging the 
code becomes a overhead 

Only one was added for our purpose (arm_smmu_xen_domain). If you don't
like the name of the 2 others, please complain on the Linux ML.

The previous SMMU drivers was diverging from the Linux code and was hard
to backport patch. So my nack is not changed on this point.

Rgards,

--
Julien Grall
_______________________________________________
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®.