summaryrefslogtreecommitdiff
path: root/include/linux/iommu.h
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2020-02-13 14:00:21 +0000
committerJoerg Roedel <jroedel@suse.de>2020-02-28 16:20:04 +0100
commit098accf2da940189f4d62d3514d17f8bb05dc6e1 (patch)
treedd6ce19e19f9c1ae3de40cbbb4bb27fa003b015e /include/linux/iommu.h
parentf8788d86ab28f61f7b46eb6be375f8a726783636 (diff)
iommu: Use C99 flexible array in fwspec
Although the 1-element array was a typical pre-C99 way to implement variable-length structures, and indeed is a fundamental construct in the APIs of certain other popular platforms, there's no good reason for it here (and in particular the sizeof() trick is far too "clever" for its own good). We can just as easily implement iommu_fwspec's preallocation behaviour using a standard flexible array member, so let's make it look the way most readers would expect. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include/linux/iommu.h')
-rw-r--r--include/linux/iommu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index d1b5f4d98569..4d1ba76c9a64 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -592,7 +592,7 @@ struct iommu_fwspec {
u32 flags;
u32 num_pasid_bits;
unsigned int num_ids;
- u32 ids[1];
+ u32 ids[];
};
/* ATS is supported */