mtd: plat-ram: Remove casting the return value which is a void pointer

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Wed Nov 13 13:59:03 EST 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=14ac07856fee903879f11932e313695de8156e9c
Commit:     14ac07856fee903879f11932e313695de8156e9c
Parent:     963d1c285fdf3b9ce93b575b879c1cba4a23d958
Author:     Jingoo Han <jg1.han at samsung.com>
AuthorDate: Mon Sep 9 14:42:52 2013 +0900
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Sun Oct 27 16:27:07 2013 -0700

    mtd: plat-ram: Remove casting the return value which is a void pointer
    
    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 at samsung.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/maps/plat-ram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c
index 6762716..3e35b9a 100644
--- a/drivers/mtd/maps/plat-ram.c
+++ b/drivers/mtd/maps/plat-ram.c
@@ -55,7 +55,7 @@ struct platram_info {
 
 static inline struct platram_info *to_platram_info(struct platform_device *dev)
 {
-	return (struct platram_info *)platform_get_drvdata(dev);
+	return platform_get_drvdata(dev);
 }
 
 /* platram_setrw



More information about the linux-mtd-cvs mailing list