xen/arm: smmu: Rename arm_smmu_xen_device with, device_iommu_info
PATCH 1/3 xen/arm: smmu: Rename arm_smmu_xen_device with, device_iommu_info
arm_smmu_xen_device is not an intuitive name for a datastructure which represents device->archdata.iommu. Rename arm_smmu_xen_device with device_iommu_info
--- xen/drivers/passthrough/arm/smmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
xen/drivers/passthrough/arm/smmu.c +0 -0
@@ -247,12 +247,12 @@ struct arm_smmu_xen_domain {* that would require to move some hackery (dummy iommu_group) in a
more generic
* place.
* */
-struct arm_smmu_xen_device {
+struct device_iommu_info {
struct iommu_domain *domain;
struct iommu_group *group;};
-#define dev_archdata(dev) ((struct arm_smmu_xen_device *)dev->archdata.iommu) +#define dev_archdata(dev) ((struct device_iommu_info *)dev->archdata.iommu)
#define dev_iommu_domain(dev) (dev_archdata(dev)->domain) #define dev_iommu_group(dev) (dev_archdata(dev)->group)
@@ -2574,7 +2574,7 @@ static int arm_smmu_assign_dev(struct domain *d, u8 devfn,
xen_domain = domain_hvm_iommu(d)->arch.priv;
if (!dev->archdata.iommu) {
- dev->archdata.iommu = xzalloc(struct arm_smmu_xen_device);
+ dev->archdata.iommu = xzalloc(struct device_iommu_info);
if (!dev->archdata.iommu)
return -ENOMEM;
}Signature · 1 line
1.9.1
Hi Manish,
Quoted 3 lines · Manish Jaggi
arm_smmu_xen_deviceis not an intuitive name for a datastructure which representsdevice->archdata.iommu. Renamearm_smmu_xen_devicewithdevice_iommu_info
device_iommu_info is not more intuitive... At least arm_smmu_xen_device shows that it's a specific Xen structure and not coming from the Linux drivers.
Regards,
Quoted 38 lines
Signed-off-by Manish Jaggi <[email protected]>--- xen/drivers/passthrough/arm/smmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)xen/drivers/passthrough/arm/smmu.c +0
-0@@ -247,12 +247,12 @@ struct arm_smmu_xen_domain {* that would require to move some hackery (dummy iommu_group) in a more generic
* place.
* */xen/drivers/passthrough/arm/smmu.c +1
-2-struct arm_smmu_xen_device { +struct device_iommu_info {struct iommu_domain *domain;struct iommu_group *group; }; -#define dev_archdata (dev) ((struct arm_smmu_xen_device*)dev->archdata.iommu)
+#definedev_archdata(dev)((structdevice_iommu_info*)dev->archdata.iommu)
#definedev_iommu_domain(dev)(dev_archdata(dev)->domain) #definedev_iommu_group(dev)(dev_archdata(dev)->group)xen/drivers/passthrough/arm/smmu.c +1
-1@@ -2574,7 +2574,7 @@ static int arm_smmu_assign_dev(struct domain *d,u8 devfn, xen_domain =domain_hvm_iommu (d)->arch.priv;if (!dev->archdata.iommu) { - dev->archdata.iommu = xzalloc(struct arm_smmu_xen_device); + dev->archdata.iommu = xzalloc(struct device_iommu_info);if (!dev->archdata.iommu)return -ENOMEM ;}
Signature · 1 line
Julien Grall
Regards,
Manish Jaggi
________________________________________
From: Julien Grall <[email protected]>
Sent: Friday, March 27, 2015 6:29 PM
To: Jaggi, Manish; Xen Devel; Stefano Stabellini; Ian Campbell; [email protected]; Kumar, Vijaya
Subject: Re: [PATCH v1 1/3] xen/arm: smmu: Rename arm_smmu_xen_device with, device_iommu_info
Hi Manish,
Quoted 3 lines · Manish Jaggi
arm_smmu_xen_deviceis not an intuitive name for a datastructure which representsdevice->archdata.iommu. Renamearm_smmu_xen_devicewithdevice_iommu_info
device_iommu_info is not more intuitive... At least arm_smmu_xen_device shows that it's a specific Xen structure and not coming from the Linux drivers.
[manish] But that is not a valid reason for a non intuitive naming. It is really hard to keep us readability of the code with arm_smmu_xen_device. It is not clear that it is referring to a device attached to smmu or smmu itself. There is another data structure arm_smmu_device as well.
Please choose another name I can take it but arm_smmu_xen_device is really confusing
Regards,
Quoted 37 lines
Signed-off-by Manish Jaggi <[email protected]>--- xen/drivers/passthrough/arm/smmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)xen/drivers/passthrough/arm/smmu.c +0
-0@@ -247,12 +247,12 @@ struct arm_smmu_xen_domain {* that would require to move some hackery (dummy iommu_group) in a more generic
* place.
* */xen/drivers/passthrough/arm/smmu.c +1
-2-struct arm_smmu_xen_device { +struct device_iommu_info {struct iommu_domain *domain;struct iommu_group *group; }; -#define dev_archdata (dev) ((struct arm_smmu_xen_device*)dev->archdata.iommu)
+#definedev_archdata(dev)((structdevice_iommu_info*)dev->archdata.iommu)
#definedev_iommu_domain(dev)(dev_archdata(dev)->domain) #definedev_iommu_group(dev)(dev_archdata(dev)->group)xen/drivers/passthrough/arm/smmu.c +1
-1@@ -2574,7 +2574,7 @@ static int arm_smmu_assign_dev(struct domain *d,u8 devfn, xen_domain =domain_hvm_iommu (d)->arch.priv;if (!dev->archdata.iommu) { - dev->archdata.iommu = xzalloc(struct arm_smmu_xen_device); + dev->archdata.iommu = xzalloc(struct device_iommu_info);if (!dev->archdata.iommu)return -ENOMEM ;
Quoted 1 line
}
--
Julien Grall
Quoted 4 lines · Manish
Regards,
Manish Jaggi
Could you please try to configure you email client correctly? It's rather confusing the "regards, Manish Jaggi" at the beginning of the mail.
Quoted 13 lines
________________________________________
From: Julien Grall <[email protected]>
Sent: Friday, March 27, 2015 6:29 PM
To: Jaggi, Manish; Xen Devel; Stefano Stabellini; Ian Campbell; [email protected]; Kumar, Vijaya
Subject: Re: [PATCH v1 1/3] xen/arm: smmu: Renamearm_smmu_xen_devicewith,device_iommu_infoHi Manish,
Quoted 3 lines · Manish Jaggi
arm_smmu_xen_deviceis not an intuitive name for a datastructure which representsdevice->archdata.iommu. Renamearm_smmu_xen_devicewithdevice_iommu_info
Quoted 5 lines
device_iommu_infois not more intuitive... At leastarm_smmu_xen_deviceshows that it's a specific Xen structure and not coming from the Linux drivers.[manish] But that is not a valid reason for a non intuitive naming. It is really hard to keep us readability of the code with
arm_smmu_xen_device. It is not clear that it is referring to a device attached to smmu or smmu itself. There is another data structurearm_smmu_deviceas well.
Did you read the comment explaining the structure arm_smmu_xen_device? It's just above the definition.
"arm_smmu" is the prefix for any structure within this file. "xen" means it's a structure added for Xen. "device" means it's data stored for a device.
Quoted 1 line
Please choose another name I can take it but
arm_smmu_xen_deviceis really confusing
I won't choose a name myself for a name that I think valid...
If you really want to change the name, you have to put at least arm_smmu_xen_ in the name.
Quoted 1 line
Regards,
Regards,
Signature · 1 line
Julien Grall
________________________________
From: Julien Grall <[email protected]>
Sent: Friday, March 27, 2015 7:05 PM
To: Jaggi, Manish; Xen Devel; Stefano Stabellini; Ian Campbell; [email protected]; Kumar, Vijaya
Subject: Re: [PATCH v1 1/3] xen/arm: smmu: Rename arm_smmu_xen_device with, device_iommu_info
Quoted 4 lines · Manish
Regards,
Manish Jaggi
Could you please try to configure you email client correctly? It's rather confusing the "regards, Manish Jaggi" at the beginning of the mail.
[manish] Fixed. Thanks for pointing out
Quoted 13 lines
________________________________________
From: Julien Grall <[email protected]>
Sent: Friday, March 27, 2015 6:29 PM
To: Jaggi, Manish; Xen Devel; Stefano Stabellini; Ian Campbell; [email protected]; Kumar, Vijaya
Subject: Re: [PATCH v1 1/3] xen/arm: smmu: Renamearm_smmu_xen_devicewith,device_iommu_infoHi Manish,
Quoted 3 lines · Manish Jaggi
arm_smmu_xen_deviceis not an intuitive name for a datastructure which representsdevice->archdata.iommu. Renamearm_smmu_xen_devicewithdevice_iommu_info
Quoted 5 lines
device_iommu_infois not more intuitive... At leastarm_smmu_xen_deviceshows that it's a specific Xen structure and not coming from the Linux drivers.[manish] But that is not a valid reason for a non intuitive naming. It is really hard to keep us readability of the code with
arm_smmu_xen_device. It is not clear that it is referring to a device attached to smmu or smmu itself. There is another data structurearm_smmu_deviceas well.
Did you read the comment explaining the structure arm_smmu_xen_device? It's just above the definition.
"arm_smmu" is the prefix for any structure within this file. "xen" means it's a structure added for Xen. "device" means it's data stored for a device.
Quoted 1 line
Please choose another name I can take it but
arm_smmu_xen_deviceis really confusing
I won't choose a name myself for a name that I think valid...
If you really want to change the name, you have to put at least arm_smmu_xen_ in the name.
[manish] what about device_archdata_priv, this is denoting what it is.
Quoted 1 line
Regards,
Regards,
--
Julien Grall
Quoted 39 lines · Manish
________________________________
From: Julien Grall <[email protected]>
Sent: Friday, March 27, 2015 7:05 PM
To: Jaggi, Manish; Xen Devel; Stefano Stabellini; Ian Campbell; [email protected]; Kumar, Vijaya
Subject: Re: [PATCH v1 1/3] xen/arm: smmu: Renamearm_smmu_xen_devicewith,device_iommu_infoQuoted 3 lines · Manish
Regards,
Manish JaggiCould you please try to configure you email client correctly? It's rather confusing the "regards, Manish Jaggi" at the beginning of the mail.
[manish] Fixed. Thanks for pointing out
Quoted 9 lines
________________________________________
From: Julien Grall <[email protected]>
Sent: Friday, March 27, 2015 6:29 PM
To: Jaggi, Manish; Xen Devel; Stefano Stabellini; Ian Campbell; [email protected]; Kumar, Vijaya
Subject: Re: [PATCH v1 1/3] xen/arm: smmu: Renamearm_smmu_xen_devicewith,device_iommu_infoHi Manish,
On 27/03/15 07:20, Manish Jaggi wrote:
Quoted 8 lines
Quoted 3 lines
arm_smmu_xen_deviceis not an intuitive name for a datastructure which representsdevice->archdata.iommu. Renamearm_smmu_xen_devicewithdevice_iommu_info
device_iommu_infois not more intuitive... At leastarm_smmu_xen_deviceshows that it's a specific Xen structure and not coming from the Linux drivers.[manish] But that is not a valid reason for a non intuitive naming. It is really hard to keep us readability of the code with
arm_smmu_xen_device. It is not clear that it is referring to a device attached to smmu or smmu itself. There is another data structurearm_smmu_deviceas well.Did you read the comment explaining the structure
arm_smmu_xen_device? It's just above the definition."
arm_smmu" is the prefix for any structure within this file. "xen" means it's a structure added for Xen. "device" means it's data stored for a device.
Quoted 9 lines
Quoted 1 line
Please choose another name I can take it but
arm_smmu_xen_deviceis really confusingI won't choose a name myself for a name that I think valid...
If you really want to change the name, you have to put at least
arm_smmu_xen_in the name.[manish] what about
device_archdata_priv, this is denoting what it is.Quoted 1 line
Regards,
As per Ians mail in other thread, %s/arm_smmu_xen_device/arch_smm_xen_device/g is ok with you ?
Quoted 4 lines
Regards,
--
Julien Grall