All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iommu/omap: Remove casting the return value which is a void pointer
@ 2013-09-09  5:39 Jingoo Han
       [not found] ` <005601cead1e$ffe78470$ffb68d50$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Jingoo Han @ 2013-09-09  5:39 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: 'Joerg Roedel', 'Suman Anna', linux-kernel,
	'Jingoo Han'

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@samsung.com>
---
 drivers/iommu/omap-iopgtable.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/omap-iopgtable.h b/drivers/iommu/omap-iopgtable.h
index f4003d5..b6f9a51 100644
--- a/drivers/iommu/omap-iopgtable.h
+++ b/drivers/iommu/omap-iopgtable.h
@@ -95,4 +95,4 @@ static inline phys_addr_t omap_iommu_translate(u32 d, u32 va, u32 mask)
 #define iopte_offset(iopgd, da)	(iopgd_page_vaddr(iopgd) + iopte_index(da))
 
 #define to_iommu(dev)							\
-	((struct omap_iommu *)platform_get_drvdata(to_platform_device(dev)))
+	(platform_get_drvdata(to_platform_device(dev)))
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [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; 5+ 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] 5+ messages in thread

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-09  5:39 [PATCH] iommu/omap: Remove casting the return value which is a void pointer Jingoo Han
     [not found] ` <005601cead1e$ffe78470$ffb68d50$%han-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-09-12 22:30   ` Suman Anna
2013-09-12 22:30     ` Suman Anna
  -- strict thread matches above, loose matches on Subject: below --
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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.