Linux IOMMU Development
 help / color / mirror / Atom feed
* [PATCH] iommu/omap: Remove casting the return value which is a void pointer
@ 2014-08-29  3:47 Jingoo Han
       [not found] ` <004e01cfc33c$03b26230$0b172690$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Jingoo Han @ 2014-08-29  3:47 UTC (permalink / raw)
  To: 'Joerg Roedel'
  Cc: 'Ohad Ben-Cohen', 'Jingoo Han',
	'Linux IOMMU', 'Laurent Pinchart'

Casting the return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language.

Signed-off-by: Jingoo Han <jg1.han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
 drivers/iommu/omap-iommu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index e202b0c24120..02ef0ace7386 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -34,8 +34,7 @@
 #include "omap-iopgtable.h"
 #include "omap-iommu.h"
 
-#define to_iommu(dev)							\
-	((struct omap_iommu *)platform_get_drvdata(to_platform_device(dev)))
+#define to_iommu(dev)	platform_get_drvdata(to_platform_device(dev))
 
 #define for_each_iotlb_cr(obj, n, __i, cr)				\
 	for (__i = 0;							\
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-29  8:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <005601cead1e$ffe78470$ffb68d50$%han@samsung.com>
     [not found] ` <005601cead1e$ffe78470$ffb68d50$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-09-12 22:30   ` [PATCH] iommu/omap: Remove casting the return value which is a void pointer Suman Anna
2014-08-29  3:47 Jingoo Han
     [not found] ` <004e01cfc33c$03b26230$0b172690$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-08-29  8:45   ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox