From: Joerg Roedel <joro@8bytes.org>
To: Will Deacon <will.deacon@arm.com>,
Robin Murphy <robin.murphy@arm.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Alex Williamson <alex.williamson@redhat.com>,
David Woodhouse <dwmw2@infradead.org>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
Joerg Roedel <jroedel@suse.de>
Subject: [PATCH 02/10] iommu: Rename struct iommu_device
Date: Fri, 3 Feb 2017 16:17:40 +0100 [thread overview]
Message-ID: <1486135068-23994-3-git-send-email-joro@8bytes.org> (raw)
In-Reply-To: <1486135068-23994-1-git-send-email-joro@8bytes.org>
From: Joerg Roedel <jroedel@suse.de>
The struct is used to link devices to iommu-groups, so
'struct group_device' is a better name. Further this makes
the name iommu_device available for a struct representing
hardware iommus.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/iommu.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 0ee05bb..e4e8a93 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -55,7 +55,7 @@ struct iommu_group {
struct iommu_domain *domain;
};
-struct iommu_device {
+struct group_device {
struct list_head list;
struct device *dev;
char *name;
@@ -374,7 +374,7 @@ static int iommu_group_create_direct_mappings(struct iommu_group *group,
int iommu_group_add_device(struct iommu_group *group, struct device *dev)
{
int ret, i = 0;
- struct iommu_device *device;
+ struct group_device *device;
device = kzalloc(sizeof(*device), GFP_KERNEL);
if (!device)
@@ -449,7 +449,7 @@ int iommu_group_add_device(struct iommu_group *group, struct device *dev)
void iommu_group_remove_device(struct device *dev)
{
struct iommu_group *group = dev->iommu_group;
- struct iommu_device *tmp_device, *device = NULL;
+ struct group_device *tmp_device, *device = NULL;
pr_info("Removing device %s from group %d\n", dev_name(dev), group->id);
@@ -484,7 +484,7 @@ void iommu_group_remove_device(struct device *dev)
static int iommu_group_device_count(struct iommu_group *group)
{
- struct iommu_device *entry;
+ struct group_device *entry;
int ret = 0;
list_for_each_entry(entry, &group->devices, list)
@@ -507,7 +507,7 @@ static int iommu_group_device_count(struct iommu_group *group)
static int __iommu_group_for_each_dev(struct iommu_group *group, void *data,
int (*fn)(struct device *, void *))
{
- struct iommu_device *device;
+ struct group_device *device;
int ret = 0;
list_for_each_entry(device, &group->devices, list) {
--
1.9.1
next prev parent reply other threads:[~2017-02-03 15:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-03 15:17 [PATCH 00/10] Let IOMMU core know about individual IOMMUs Joerg Roedel
2017-02-03 15:17 ` [PATCH 01/10] iommu: Rename iommu_get_instance() Joerg Roedel
2017-02-03 15:17 ` Joerg Roedel [this message]
2017-02-03 15:17 ` [PATCH 03/10] iommu: Introduce new 'struct iommu_device' Joerg Roedel
2017-02-03 16:08 ` kbuild test robot
2017-02-03 19:25 ` kbuild test robot
2017-02-03 15:17 ` [PATCH 04/10] iommu: Add sysfs bindings for struct iommu_device Joerg Roedel
2017-02-03 19:53 ` kbuild test robot
2017-02-03 15:17 ` [PATCH 05/10] iommu: Make iommu_device_link/unlink take a " Joerg Roedel
2017-02-03 15:17 ` [PATCH 06/10] iommu/arm-smmu: Make use of the iommu_register interface Joerg Roedel
2017-02-03 15:17 ` [PATCH 07/10] iommu/msm: Make use of iommu_device_register interface Joerg Roedel
2017-02-03 15:17 ` [PATCH 08/10] iommu/mediatek: " Joerg Roedel
2017-02-03 15:17 ` [PATCH 09/10] iommu/exynos: " Joerg Roedel
2017-02-03 15:17 ` [PATCH 10/10] iommu: Remove iommu_register_instance interface Joerg Roedel
-- strict thread matches above, loose matches on Subject: below --
2017-02-06 16:10 [PATCH 00/10 v2] Let IOMMU core know about individual IOMMUs Joerg Roedel
2017-02-06 16:10 ` [PATCH 02/10] iommu: Rename struct iommu_device Joerg Roedel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1486135068-23994-3-git-send-email-joro@8bytes.org \
--to=joro@8bytes.org \
--cc=alex.williamson@redhat.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=robin.murphy@arm.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox