Linux-ext4 Archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@dilger.ca>
To: Li zeming <zeming@nfschina.com>
Cc: Theodore Ts'o <tytso@mit.edu>,
	Ext4 Developers List <linux-ext4@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ext4: block_validity: Remove unnecessary ‘NULL’ values from new_node
Date: Mon, 8 Apr 2024 14:54:27 -0600	[thread overview]
Message-ID: <4E5BC096-0EEC-467E-8C6B-276CF5BED332@dilger.ca> (raw)
In-Reply-To: <20240402022300.25858-1-zeming@nfschina.com>

[-- Attachment #1: Type: text/plain, Size: 961 bytes --]

On Apr 1, 2024, at 8:23 PM, Li zeming <zeming@nfschina.com> wrote:
> 
> new_node is assigned first, so it does not need to initialize the
> assignment.
> 
> Signed-off-by: Li zeming <zeming@nfschina.com>
> ---
> fs/ext4/block_validity.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ext4/block_validity.c b/fs/ext4/block_validity.c
> index 6fe3c941b5651..87ee3a17bd29c 100644
> --- a/fs/ext4/block_validity.c
> +++ b/fs/ext4/block_validity.c
> @@ -72,7 +72,7 @@ static int add_system_zone(struct ext4_system_blocks *system_blks,
> {
> 	struct ext4_system_zone *new_entry, *entry;
> 	struct rb_node **n = &system_blks->root.rb_node, *node;
> -	struct rb_node *parent = NULL, *new_node = NULL;
> +	struct rb_node *parent = NULL, *new_node;

This one is more compact and doesn't have the issue with
the "cleanup" label at the end.

Reviewed-by: Andreas Dilger <adilger@dilger.ca>

Cheers, Andreas






[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 873 bytes --]

      reply	other threads:[~2024-04-08 20:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02  2:23 [PATCH] ext4: block_validity: Remove unnecessary ‘NULL’ values from new_node Li zeming
2024-04-08 20:54 ` Andreas Dilger [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=4E5BC096-0EEC-467E-8C6B-276CF5BED332@dilger.ca \
    --to=adilger@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).