* [PATCH] iommu/omap: Remove casting the return value which is a void pointer
@ 2013-09-09 5:39 Jingoo Han
2013-09-12 22:30 ` Suman Anna
0 siblings, 1 reply; 2+ 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] 2+ messages in thread
* Re: [PATCH] iommu/omap: Remove casting the return value which is a void pointer
2013-09-09 5:39 [PATCH] iommu/omap: Remove casting the return value which is a void pointer Jingoo Han
@ 2013-09-12 22:30 ` Suman Anna
0 siblings, 0 replies; 2+ messages in thread
From: Suman Anna @ 2013-09-12 22:30 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Andrew Morton', 'Joerg Roedel', linux-kernel,
iommu
On 09/09/2013 12:39 AM, Jingoo Han wrote:
> 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>
Thanks, LGTM.
> ---
> 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)))
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-12 22:30 UTC | newest]
Thread overview: 2+ 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
2013-09-12 22:30 ` Suman Anna
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox