[PATCH] hugetlbfs: inode: Remove unnecessary (void*) conversions

Li zeming posted 1 patch 3 years, 5 months ago
fs/hugetlbfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] hugetlbfs: inode: Remove unnecessary (void*) conversions
Posted by Li zeming 3 years, 5 months ago
The ei pointer does not need to cast the type.

Signed-off-by: Li zeming <zeming@nfschina.com>
---
 fs/hugetlbfs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index f7a5b5124d8a..0728531992a2 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -1160,7 +1160,7 @@ static const struct address_space_operations hugetlbfs_aops = {
 
 static void init_once(void *foo)
 {
-	struct hugetlbfs_inode_info *ei = (struct hugetlbfs_inode_info *)foo;
+	struct hugetlbfs_inode_info *ei = foo;
 
 	inode_init_once(&ei->vfs_inode);
 }
-- 
2.18.2
Re: [PATCH] hugetlbfs: inode: Remove unnecessary (void*) conversions
Posted by Muchun Song 3 years, 5 months ago

> On Nov 7, 2022, at 09:56, Li zeming <zeming@nfschina.com> wrote:
> 
> The ei pointer does not need to cast the type.
> 
> Signed-off-by: Li zeming <zeming@nfschina.com>

Reviewed-by: Muchun Song <songmuchun@bytedance.com>