]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
iommu/omap: Fix compilation warnings
authorJoerg Roedel <jroedel@suse.de>
Fri, 9 Aug 2019 16:09:13 +0000 (18:09 +0200)
committerJoerg Roedel <jroedel@suse.de>
Fri, 9 Aug 2019 17:56:05 +0000 (19:56 +0200)
A recent patch introduced a new compiler warning because
two functions with non-void return type have no return
statement in omap-iommu.h for CONFIG_OMAP_IOMMU=n.

Fix this by adding return statements to these functions.

Fixes: d9c4d8a6cc0f8 ('iommu/omap: introduce new API for runtime suspend/resume control')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
include/linux/omap-iommu.h

index 36b64572681321c902cbffe529491f3059bb1a7f..2c32ca09df02504447222d744d5459eaa2a3e9cb 100644 (file)
@@ -22,8 +22,15 @@ int omap_iommu_domain_activate(struct iommu_domain *domain);
 static inline void omap_iommu_save_ctx(struct device *dev) {}
 static inline void omap_iommu_restore_ctx(struct device *dev) {}
 
-static inline int omap_iommu_domain_deactivate(struct iommu_domain *domain) {}
-static inline int omap_iommu_domain_activate(struct iommu_domain *domain) {}
+static inline int omap_iommu_domain_deactivate(struct iommu_domain *domain)
+{
+       return -ENODEV;
+}
+
+static inline int omap_iommu_domain_activate(struct iommu_domain *domain)
+{
+       return -ENODEV;
+}
 #endif
 
 #endif