* [PATCH] ext4: block_validity: Remove unnecessary ‘NULL’ values from new_node
@ 2024-04-02 2:23 Li zeming
2024-04-08 20:54 ` Andreas Dilger
0 siblings, 1 reply; 2+ messages in thread
From: Li zeming @ 2024-04-02 2:23 UTC (permalink / raw)
To: tytso, adilger.kernel; +Cc: linux-ext4, linux-kernel, Li zeming
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;
while (*n) {
parent = *n;
--
2.18.2
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] ext4: block_validity: Remove unnecessary ‘NULL’ values from new_node
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
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Dilger @ 2024-04-08 20:54 UTC (permalink / raw)
To: Li zeming
Cc: Theodore Ts'o, Ext4 Developers List, Linux Kernel Mailing List
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-08 20:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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®