Skip to content

Commit 4762315

Browse files
rddunlapjoergroedel
authored andcommitted
iommu/of: mark an unused function as __maybe_unused
When CONFIG_OF_ADDRESS is not set, there is a build warning/error about an unused function. Annotate the function to quieten the warning/error. ../drivers/iommu/of_iommu.c:176:29: warning: 'iommu_resv_region_get_type' defined but not used [-Wunused-function] 176 | static enum iommu_resv_type iommu_resv_region_get_type(struct device *dev, struct resource *phys, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: a5bf3cf ("iommu: Implement of_iommu_get_resv_regions()") Signed-off-by: Randy Dunlap <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] Reviewed-by: Thierry Reding <[email protected]> Link: https://lore.kernel.org/r/[email protected] [joro: Improve code formatting] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 189d496 commit 4762315

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/iommu/of_iommu.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,10 @@ const struct iommu_ops *of_iommu_configure(struct device *dev,
173173
return ops;
174174
}
175175

176-
static enum iommu_resv_type iommu_resv_region_get_type(struct device *dev, struct resource *phys,
177-
phys_addr_t start, size_t length)
176+
static enum iommu_resv_type __maybe_unused
177+
iommu_resv_region_get_type(struct device *dev,
178+
struct resource *phys,
179+
phys_addr_t start, size_t length)
178180
{
179181
phys_addr_t end = start + length - 1;
180182

0 commit comments

Comments
 (0)