From: Jan Kara <jack@suse.cz>
To: Li zeming <zeming@nfschina.com>
Cc: jack@suse.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs: udf: Optimize udf_free_in_core_inode and udf_find_fileset function
Date: Wed, 12 Oct 2022 17:32:46 +0200 [thread overview]
Message-ID: <20221012153246.pt6ju4i3cdsenbny@quack3> (raw)
In-Reply-To: <20221012104235.3331-1-zeming@nfschina.com>
On Wed 12-10-22 18:42:35, Li zeming wrote:
> 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 <zeming@nfschina.com>
Thanks for the patch. It looks good, I'll queue it into my tree once the
merge window closes.
Honza
> ---
> fs/udf/super.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/udf/super.c b/fs/udf/super.c
> index 4042d9739fb7..06eda8177b5f 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;
>
> --
> 2.18.2
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
prev parent reply other threads:[~2022-10-12 15:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 10:42 Li zeming
2022-10-12 15:32 ` Jan Kara [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221012153246.pt6ju4i3cdsenbny@quack3 \
--to=jack@suse.cz \
--cc=jack@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zeming@nfschina.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®