From: Li zeming Date: Wed, 12 Oct 2022 10:42:35 +0000 (+0800) Subject: fs: udf: Optimize udf_free_in_core_inode and udf_find_fileset function X-Git-Tag: v6.6.17~5979^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0dafb7e671f0e769c854609548037754a68dcbc6;p=platform%2Fkernel%2Flinux-rpi.git fs: udf: Optimize udf_free_in_core_inode and udf_find_fileset function These two functions perform the following optimizations. 1. Delete the type cast of foo pointer. Void * does not need to convert the type. 2. Delete the initialization assignment of bh variable, which is assigned first. Signed-off-by: Li zeming Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20221012104235.3331-1-zeming@nfschina.com --- diff --git a/fs/udf/super.c b/fs/udf/super.c index 4042d97..06eda817 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -162,7 +162,7 @@ static void udf_free_in_core_inode(struct inode *inode) static void init_once(void *foo) { - struct udf_inode_info *ei = (struct udf_inode_info *)foo; + struct udf_inode_info *ei = foo; ei->i_data = NULL; inode_init_once(&ei->vfs_inode); @@ -820,7 +820,7 @@ static int udf_find_fileset(struct super_block *sb, struct kernel_lb_addr *fileset, struct kernel_lb_addr *root) { - struct buffer_head *bh = NULL; + struct buffer_head *bh; uint16_t ident; int ret;