All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
To: Kemeng Shi <shikemeng@huaweicloud.com>,
	tytso@mit.edu, adilger.kernel@dilger.ca, ojaswin@linux.ibm.com,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: shikemeng@huaweicloud.com
Subject: Re: [PATCH 05/10] ext4: remove unnecessary return for void function
Date: Fri, 21 Jul 2023 21:13:38 +0530	[thread overview]
Message-ID: <877cqtl179.fsf@doe.com> (raw)
In-Reply-To: <20230721171007.2065423-6-shikemeng@huaweicloud.com>

Kemeng Shi <shikemeng@huaweicloud.com> writes:

> The return at end of void function is nunecessary, just remove it.

s/nunecessary/unnecessary

Note, while applying this patch series on ted's dev branch, I got a
conflict in this patch. It's eaier to resolve, however you might want to
make sure that it is cleanly applicable on a given tree in v2. 

>
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
> ---
>  fs/ext4/mballoc.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index b838944b5f09..78160bf5b533 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -4880,7 +4880,6 @@ static void ext4_mb_generate_from_freelist(struct super_block *sb, void *bitmap,
>  		mb_set_bits(bitmap, entry->efd_start_cluster, entry->efd_count);
>  		n = rb_next(n);
>  	}
> -	return;
>  }
>  
>  /*
> @@ -5634,12 +5633,10 @@ static void ext4_mb_show_ac(struct ext4_allocation_context *ac)
>  #else
>  static inline void ext4_mb_show_pa(struct super_block *sb)
>  {
> -	return;
>  }
>  static inline void ext4_mb_show_ac(struct ext4_allocation_context *ac)
>  {
>  	ext4_mb_show_pa(ac->ac_sb);
> -	return;
>  }
>  #endif
>  
> @@ -5885,7 +5882,6 @@ static void ext4_mb_add_n_trim(struct ext4_allocation_context *ac)
>  						  order, lg_prealloc_count);
>  		return;

Why not kill this ^^ return too?

>  	}
> -	return ;
>  }
>  
>  /*
> @@ -6470,7 +6466,6 @@ static void ext4_mb_clear_bb(handle_t *handle, struct inode *inode,
>  	}
>  error_return:
>  	ext4_std_error(sb, err);
> -	return;
>  }
>  
>  /**
> @@ -6573,7 +6568,6 @@ void ext4_free_blocks(handle_t *handle, struct inode *inode,
>  	}
>  
>  	ext4_mb_clear_bb(handle, inode, block, count, flags);
> -	return;
>  }
>  
>  /**
> -- 
> 2.30.0

With above addressed, feel free to add: 

Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>

-ritesh

  reply	other threads:[~2023-07-21 15:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 17:09 [PATCH 00/10] A few fixes and cleanups to mballoc Kemeng Shi
2023-07-21 15:55 ` Ritesh Harjani
2023-07-25  2:09   ` Kemeng Shi
2023-07-21 17:09 ` [PATCH 01/10] ext4: correct grp validation in ext4_mb_good_group Kemeng Shi
2023-07-21 15:22   ` Ritesh Harjani
2023-07-21 17:09 ` [PATCH 02/10] ext4: avoid potential data overflow in next_linear_group Kemeng Shi
2023-07-21 15:26   ` Ritesh Harjani
2023-07-21 17:10 ` [PATCH 03/10] ext4: return found group directly in ext4_mb_choose_next_group_p2_aligned Kemeng Shi
2023-07-21 15:31   ` Ritesh Harjani
2023-07-21 17:10 ` [PATCH 04/10] ext4: use is_power_of_2 helper in ext4_mb_regular_allocator Kemeng Shi
2023-07-21 15:37   ` Ritesh Harjani
2023-07-21 17:10 ` [PATCH 05/10] ext4: remove unnecessary return for void function Kemeng Shi
2023-07-21 15:43   ` Ritesh Harjani [this message]
2023-07-21 17:10 ` [PATCH 06/10] ext4: replace the traditional ternary conditional operator with with max()/min() Kemeng Shi
2023-07-21 15:44   ` Ritesh Harjani
2023-07-21 17:10 ` [PATCH 07/10] ext4: remove unused ext4_{set}/{clear}_bit_atomic Kemeng Shi
2023-07-21 15:45   ` Ritesh Harjani
2023-07-21 17:10 ` [PATCH 08/10] ext4: return found group directly in ext4_mb_choose_next_group_goal_fast Kemeng Shi
2023-07-21 15:45   ` Ritesh Harjani
2023-07-21 17:10 ` [PATCH 09/10] ext4: return found group directly in ext4_mb_choose_next_group_best_avail Kemeng Shi
2023-07-21 15:48   ` Ritesh Harjani
2023-07-21 17:10 ` [PATCH 10/10] ext4: correct some stale comment of criteria Kemeng Shi
2023-07-21 15:49   ` Ritesh Harjani

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=877cqtl179.fsf@doe.com \
    --to=ritesh.list@gmail.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojaswin@linux.ibm.com \
    --cc=shikemeng@huaweicloud.com \
    --cc=tytso@mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.